Click here to Skip to main content
15,892,059 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
hi,


i am using vs 3.5 framework when i try to debug it giving error at first line that
"The Web application at http://enk-msos-soft3/ could not be found"


C#
  SPSecurity.RunWithElevatedPrivileges(delegate()
{
    string site_Str = "http://enk-msos-soft3/";
    SPSite oSiteCollection = new SPSite(site_Str);
   // SPSite oSiteCollection = new SPSite("http://enk-msos-soft3/");
    SPWeb oWebsiteRoot = oSiteCollection.OpenWeb();
    oWebsiteRoot.AllowUnsafeUpdates = true;
    SPList ListCompliance = oWebsiteRoot.Lists["Employment Activity"];
    SPQuery queryfilteremp = new SPQuery();

   });


but same code working in windows application is there anything to change code in web application
Please see regarding this issue


Thanks
Posted
Updated 16-Oct-13 19:45pm
v2

1 solution

This is because there is no HTTP service at this URI. I also see that his page is not found. How can it be a problem? Use some URI which really work. :-)

After all, if you are not sure that your code is correct, try your URI with some available Web browser or other HTTP client (a downloader, for example)…

—SA
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900