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