SharePoint Site url is not working for debugging a solution
Frage
For debugging a SharePoint solution I want to give test site URL in visual studio.
but since web application URL is already access mapped
(http://example:2344 -> http://example.com).
When I try to give http://example.com URL in, it shows
"Remote SharePoint site connections are not supported "
How can I use http://example.com (Alternate Access Mapped Url) for debugging purpose since currently, I don't have original URL (http://example:2344)?
Lösung
I think you need to configure the hosts file on your server to map the server IP to the hostname.
To Edit Host file
- Open your NotePad as administrator.
- From Notepad, open the following file:
c:\Windows\System32\Drivers\etc\hosts
Add new entry as the following:
Server IP > click Tab > hostname , for example:
127.0.0.1 example.com
Click File > Save to save your changes.
Andere Tipps
use the Get-SPAlternateURL
cmdlet, you can find the existing AAM settings for a web application.
Try this..
1)Open the project path in Windows Explorer
2)Locate the file .csproj.user(or .vbproj.user)
3)Open it with text editor(e.g. Notepad)
4)Change the SharePointSiteUrl property
5)Save the file, and then re-open the project (by deploying)
This works perfectly for me..
Thanks Jinchun Chen