[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.frontpage.programming

FP2003: Open Method on Web Object not leveraging UserName / Password parameters

Colin Bowern

4/28/2004 6:31:00 PM

I'm working on a Visual Basic .NET application that leverages the FrontPage
object model to pull information from two remote servers.

When I make a call to the Open method on the Webs object, I pass in a valid
username and password for the web. However, when the first real method
against the resulting Web object is executed, the FrontPage window appears
and prompts the user with the following message:

"You do not have permission to do this operation. Ask your web site
administrator to change your permissions and then try again, or log on with
a user account that has this permission. To log on with a different user
account click OK."

The user account that is passed through the Open method does have sufficient
permissions (Administrator rights), and if I re-enter the username and
password in the dialog after clicking OK, it works just fine. I'd like to
prevent this from popping up if at all possible. Any thoughts on why it
isn't leveraging the credentials passed in the Open method?

--- Code Snippet ---
Private _fpApplication As FrontPage.Application
Private _stagingWeb As FrontPage.WebEx
....
Public Sub Open(ByVal developmentWebUrl As Uri, ByVal stagingWebUrl As Uri,
ByVal productionWebUrl As Uri)
....
_stagingWeb = _fpApplication.Webs.Open(stagingurl, stagingusername,
stagingpassword, FrontPage.FpWebOpenFlags.fpOpenNoWindow)
_productionWeb = _fpApplication.Webs.Open(productionurl,
productionusername, productionpassword,
FrontPage.FpWebOpenFlags.fpOpenNoWindow)
....
FillDataSet()
....
End Sub
....
Public Sub FillDataSet()
....
stagingFile = _stagingWeb.LocateFile(folderName + "/" +
currentFile.Name)
productionFile = _productionWeb.LocateFile(folderName + "/" +
currentFile.Name)
....
End Sub
-----------------------------

Thanks!
Colin


1 Answer

Greg Chagnon

4/29/2004 3:56:00 PM

0

Hi Colin,

We've attempted to work the FP3 Interop and came to the conclusion that it is not ready for production development. We not only
experienced a number of problems but in speaking with MS personnel they also admitted they were experiencing the same problems.


--
Mike -- FrontPage MVP '97 - '02
http://www.websunl...




"Colin Bowern" <colin.bowern@nospam.indimensions.com> wrote in message news:OavF57ULEHA.2388@TK2MSFTNGP09.phx.gbl...
> I'm working on a Visual Basic .NET application that leverages the FrontPage
> object model to pull information from two remote servers.
>
> When I make a call to the Open method on the Webs object, I pass in a valid
> username and password for the web. However, when the first real method
> against the resulting Web object is executed, the FrontPage window appears
> and prompts the user with the following message:
>
> "You do not have permission to do this operation. Ask your web site
> administrator to change your permissions and then try again, or log on with
> a user account that has this permission. To log on with a different user
> account click OK."
>
> The user account that is passed through the Open method does have sufficient
> permissions (Administrator rights), and if I re-enter the username and
> password in the dialog after clicking OK, it works just fine. I'd like to
> prevent this from popping up if at all possible. Any thoughts on why it
> isn't leveraging the credentials passed in the Open method?
>
> --- Code Snippet ---
> Private _fpApplication As FrontPage.Application
> Private _stagingWeb As FrontPage.WebEx
> ...
> Public Sub Open(ByVal developmentWebUrl As Uri, ByVal stagingWebUrl As Uri,
> ByVal productionWebUrl As Uri)
> ...
> _stagingWeb = _fpApplication.Webs.Open(stagingurl, stagingusername,
> stagingpassword, FrontPage.FpWebOpenFlags.fpOpenNoWindow)
> _productionWeb = _fpApplication.Webs.Open(productionurl,
> productionusername, productionpassword,
> FrontPage.FpWebOpenFlags.fpOpenNoWindow)
> ...
> FillDataSet()
> ...
> End Sub
> ...
> Public Sub FillDataSet()
> ...
> stagingFile = _stagingWeb.LocateFile(folderName + "/" +
> currentFile.Name)
> productionFile = _productionWeb.LocateFile(folderName + "/" +
> currentFile.Name)
> ...
> End Sub
> -----------------------------
>
> Thanks!
> Colin
>
>