The Web application at http://XXX could not be found

Jun 11, 2011 at 7:57 PM

When you run the application in WFE SERVER, the following error is displayed:

Unhandled Exception: System.IO.FileNotFoundException: The Web application at http://XXXX could not be found. Verify that you have typed the URL correctly. If the URL should be serving existing content, the system administrator may needto add a new request URL mapping to the intended application.   at Microsoft.SharePoint.SPSite..ctor(SPFarm farm, Uri requestUri, Boolean contextSite, SPUserToken userToken)   at Microsoft.SharePoint.SPSite..ctor(String requestUrl)   at FileMigrateConsole.Program.getGroupNames()   at FileMigrateConsole.Program.Main(String[] args)

The application must run in the app server (Central Administration)?

Coordinator
Jun 12, 2011 at 12:28 AM

Please try to run the tool from SharePoint server locally.

Jun 21, 2011 at 3:28 AM

 

run the application on App Server (Central Administration)

Jun 21, 2011 at 5:59 PM

Version 1.1 display this error:

Unhandled Exception: System.IO.FileNotFoundException: The Web application at htt
p://XXXX could not be found. Verify that you have typed the URL correctly. If t
he URL should be serving existing content, the system administrator may need to
add a new request URL mapping to the intended application.
   at Microsoft.SharePoint.SPSite..ctor(SPFarm farm, Uri requestUri, Boolean con
textSite, SPUserToken userToken)
   at Microsoft.SharePoint.SPSite..ctor(String requestUrl)
   at FileMigrateConsole.Program.getGroupNames()
   at FileMigrateConsole.Program.Main(String[] args)

Coordinator
Jun 22, 2011 at 11:53 PM
danielfioqui wrote:

Version 1.1 display this error:

Unhandled Exception: System.IO.FileNotFoundException: The Web application at htt
p://XXXX could not be found. Verify that you have typed the URL correctly. If t
he URL should be serving existing content, the system administrator may need to
add a new request URL mapping to the intended application.
   at Microsoft.SharePoint.SPSite..ctor(SPFarm farm, Uri requestUri, Boolean con
textSite, SPUserToken userToken)
   at Microsoft.SharePoint.SPSite..ctor(String requestUrl)
   at FileMigrateConsole.Program.getGroupNames()
   at FileMigrateConsole.Program.Main(String[] args)

Did you run it from the web front server "as administrator"?  You also need to be the site collection adminsitrator.

Jun 23, 2011 at 2:08 AM

I'm you run it from the web front server "as administrator". Account is  Farm Administrator and site collection administrator.

Version 1.1 display this error.

Jun 23, 2011 at 11:43 PM

I selected option "Allow unsafe code" in visual studio and it worked!!!!

Coordinator
Jun 24, 2011 at 12:30 AM
danielfioqui wrote:

I selected option "Allow unsafe code" in visual studio and it worked!!!!

WOW, thanks Daniel!

I will change that as soon as possible.