Using Sharepoint Object Model in Visual Studio Windows Service
-
SPSite osite = new SPSite("http://litwaredemo/Test"); When im trying to acess the following site using sharepoint object model in windows service it give me an an Exception: it give me an exception message: The Web application at http://litwaredemo:80/Test 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. ( but the above statement working fine when i use this statement in console application ) can any one help to resolve this error
KnightGuy
-
SPSite osite = new SPSite("http://litwaredemo/Test"); When im trying to acess the following site using sharepoint object model in windows service it give me an an Exception: it give me an exception message: The Web application at http://litwaredemo:80/Test 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. ( but the above statement working fine when i use this statement in console application ) can any one help to resolve this error
KnightGuy
Not sure in your case but I've seen this happen when the application is compiled as x64.
I know the language. I've read a book. - _Madmatt
-
SPSite osite = new SPSite("http://litwaredemo/Test"); When im trying to acess the following site using sharepoint object model in windows service it give me an an Exception: it give me an exception message: The Web application at http://litwaredemo:80/Test 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. ( but the above statement working fine when i use this statement in console application ) can any one help to resolve this error
KnightGuy
I think you have to give like SPSite osite = new SPSite("http://litwaredemo:1234/Test"); Notice that 1234 is the port number.
-
I think you have to give like SPSite osite = new SPSite("http://litwaredemo:1234/Test"); Notice that 1234 is the port number.
I guess you don't know anything about SharePoint. SharePoint is on port 80, the default port for http so there is no need to specify the port, nor would it be anything other than port 80 except for central admin.
I know the language. I've read a book. - _Madmatt
-
I guess you don't know anything about SharePoint. SharePoint is on port 80, the default port for http so there is no need to specify the port, nor would it be anything other than port 80 except for central admin.
I know the language. I've read a book. - _Madmatt
I am beginner to sharepoint. I know sharepoint default port is 80. I just given my view only.
-
I guess you don't know anything about SharePoint. SharePoint is on port 80, the default port for http so there is no need to specify the port, nor would it be anything other than port 80 except for central admin.
I know the language. I've read a book. - _Madmatt
This is not true. SharePoint web applications can be set to use any available port. 80 is the default, but you can create web applications and site collections on different ports as well. When constructing the SPSite object then you need to specify the correct url (with port unless its 80 then you dont need to include the port). The problem I think the user is facing is he is not compiling as 'Any CPU', I have also seen this happen when UAC is turned on and you dont run VS as Admin.
-
This is not true. SharePoint web applications can be set to use any available port. 80 is the default, but you can create web applications and site collections on different ports as well. When constructing the SPSite object then you need to specify the correct url (with port unless its 80 then you dont need to include the port). The problem I think the user is facing is he is not compiling as 'Any CPU', I have also seen this happen when UAC is turned on and you dont run VS as Admin.
It holds true 95% of installations and since the OP was using the default setup it also holds true in this situation. There are always exceptions.
I know the language. I've read a book. - _Madmatt