Click here to Skip to main content
15,919,749 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
this is the error that i am getting when i ac

The Web application at http://rakesh-pc:13938/sites/aBIa1 could not be found. Verify that you have typed the URL correctly. If the URL should be serving existing content, the system administrator may need to add a new request URL mapping to the intended application.


here is my code


XML
StringBuilder builder = new StringBuilder();
               using (SPSite sitecol = new SPSite("http://rakesh-pc:13938/sites/aBIa1")) //here i am getting an error 
               {
                   SPWeb web = sitecol.OpenWeb();
                   SPList list = web.Lists["StoreDocument"];
                   if ((!list.IsApplicationList) && (list.OnQuickLaunch))
                   {
                       if (list.Items.Count > 0)
                       {
                           // Display Library Name
                           builder.Append("<h2>" + web.Title + " > " + list.Title + "</h2></br>");

                           foreach (SPListItem item in list.Items)
                           {
                               // Display File Name
                               builder.Append(item.File.Name + " (" + (item.File.Length / 1024).ToString() + " KB) </br>");

                               //total += item.File.Length;
                           }

                           builder.Append("</br>");
                       }
                   }

               }
Posted
Comments
AnandSharmaUK 3-May-13 10:39am    
make sure your solution is 64bit under project properties - Any CPU (change to x64)
rakesh550 4-May-13 0:27am    
I tried this but its still giving the same error

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



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