开发者

IP address v/s machine name

My server name : server, my server ip is 192.168.10.200

SPSite site = new SPSite("192.168.10.200:7000") throws the following exception:

The Web application at http://192.168.10.200:7000 could not be found. Verify that you have typed the URL correctly. If the URL should be serving existing content, t开发者_开发问答he system administrator may need to add a new request URL mapping to the intended application

.

while SPSite site = new SPSite("server:7000") works perfectly.

any ideas?

OS: Windows 7 64 bits + Sharepoint 2010


Your server is set up for serving more than one website and uses a Host header in the http request to sort out which one a request is for.

If you give it the IP address, it doesn't know which web server is meant.


The site could be configured with a host header for server and thus only answering on that and not on IP.


One clue is that your code says the port number is 7000 but the error message says it is 8000. Is that a typo in your actual code, or did you make a mistake in transcribing the code or message into your Question?

Also, the IP addresses don't match.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜