WCF Service testing with connections external to localhost - wcf

I'm developing a WCF webservice, but when it loads via visual studio in the built in server (Cassini) I cannot access it anyway except via localhost on that machine. I would like to try it with connections from other machines as well though... what's the best way to do this without installing IIS on my box (I can't...stupid system corporate policies prevent it).

You might be able to use / install IIS Express (see this link) without administrative privileges. However sadly Cassini does not allow remote connections.

If I am not mistaken, you should install IIS. Cassini does not support remote connections.

Related

Configure Remote Access on Windows 2012 Server without IIS

I am running through the procedure to create a Windows 2012 Server, and I need Remote Access enabled. However, when I run through the installation process, it tells me I need to install IIS. Well I don't want IIS because I will have an Apache server running, but I have no choice. In Windows Server 2008 there was no need to install IIS when configuring Remote Access ( which used to be a part of Network Policy and Access Services ).
What can I do if I need Remote Access, need Apache, and don't want IIS?
To solve this I simply deleted the default website created with IIS, restarted Apache and it works fine.

Web Deploy results in ERROR_COULD_NOT_CONNECT_TO_REMOTESVC

We are trying to configure continuous integration with TFS 2012. While queuing a new build, the publish fails with the error:
Build FAILED.
"C:\src\ProjectName.sln" (default target) (1) ->
"C:\src\Website\ProjectName.csproj" (default target) (2) ->
(MSDeployPublish target) ->
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\Web\Microsoft.Web.Publishing.targets(4377,5): msdeploy error ERROR_COULD_NOT_CONNECT_TO_REMOTESVC: Web deployment task failed. (Could not connect to the remote computer ("ServerName") using the specified process ("Web Management Service") because the server did not respond. Make sure that the process ("Web Management Service") is started on the remote computer. Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_COULD_NOT_CONNECT_TO_REMOTESVC)**
I checked all the points mentioned in the IIS.NET documentation for this error. Both services mentioned, Web Management Service and Web Deployment Agent Service, are running fine. A restart of those services has no change in behavior.
Windows Server 2008 R2 with IIS 7.
Web Deployment Agent Service is running on port 8172.
Web Deploy 3.0
Windows Firewall is not blocking any port on the server.
How can this be fixed?
If you install Web Deploy 3.x BEFORE Web Management Tools are installed, you'll have to re-install Web Deploy. I beat my head against the wall for hours on this.
Install the Web Management Services ("Turn Windows Features On/Off"/Roles -> Web Server -> Management Tools -> Management Service)
Then uninstall Web Deploy (repair didn't work) via the usual Add/Remove Programs control panel
Install Web Deploy 3.x again using Web Platform Installer.
Fixed. /Sigh
Double check in your Web Deploy settings that the name of the website is exactly that of what's in IIS.
Ben Day blogged more about it.
Fix that i saw on another website:
Fix it by adding “http://” to server.
In other words, when server is www.xxxx.com would get the 403 error, but when server is http://www.xxxx.com, then it works.
You need also to indicate the app name e.g 'Default Web Site/MyApp'
That was my error. Once I added /MyApp, it worked.
I got this error when using msdeploy, not TFS. In my case I needed to make sure the user msdeploy is using had permission to deploy to the website.
Find the website in IIS manager, right click and go to Deploy, then Configure Web Deploy Publishing. Find the user used by Web Deploy and setup for this website.
In my case the Internet proxy was enabled on source - which made msdeploy to reach out to internet instead of local ICN.
You should check the logs on your IIS first - see that you actually get to the server, and then you can locate the exact error here - https://support.microsoft.com/en-us/help/943891/the-http-status-code-in-iis-7-0-iis-7-5-and-iis-8-0
Uninstalling and re-installing (not repairing!) after setting up IIS did most of the magic for me.
There is another possible cause of the error. IIS Managemente Service have its own configuration for IP Address Restrictions, which default value is Deny Access for unspecified clients (Windows Server 2012 R2 with IIS 8.5).
You must set this value to Allow or add access to your specific IP address/IP address range using the Allow... button.
Remember, you must Stop the Management Service previously to change this configuration.

Unable to launch solution: MyApp is configured to use IIS. The Web server 'http://localhost:64646/' could not be found

When trying to launch solution, I receive the following error:
error : The Web Application Project MyApp is configured to use IIS. The Web server 'http://localhost:64646/' could not be found.
How do I resolve this issue?
I opened IIS and set the TCP port on the Default Web Site to 64646 and the project loaded without error.
You need to install IIS on your development machine.
Using IIS you'll also need to run Visual Studio in Admin Mode as well.
It is recommended that you use IIS Express since it will allow you to run VS without Admin privileges.
You have to install IIS and create the web site in IIS with the matching port number. Someone else created the visual studio web project to use IIS and configured it on their computer. Each person who opens the solution has to have all the websites configured in IIS manually.
You might consider creating a script that auto-creates them in the source repository. You can do it using AppCmd.exe (ADD SITE, ADD APPPOOL, LIST APPPOOL, LIST SITE) (%windir%\system32\inetsrv\AppCmd.exe).

Use WebDav in Sharepoint 2010

I have done some research, based on the problem that my single server gives me when I try to open a document library in windows explorer from the ribbon menu item "Open in Windows Explorer".
The same problem occurs when I try to map sharepoint to a folder in windows explorer too.
The error is:
Your client does not support opening this list with Windows Explorer
From the net, suggestions are:
(Since I'm trying this operation from server itself) enable Desktop Experience
Install the KB907306 update.
Enable IIS webDav service (Some say, it's just for additional functions from the MS Whitepaper)
(Edit) Started webClient service
I've already done them. Nothing changed. Proper machine restart and iis too have done.
Need some serious advice.
Thanks in advance.
Not sure if we are having exactly the same problem BUT I have had similar problem while accessing SP via Windows Explorer in Windows Server 2k8.
What I done to fix it is following:
Install new server feature called Desktop Experience (it comes with WebDAV redirector, which allows you to connect to WebDAV) - Note: Server will need to be restarted.
In Services start WebClient service (go to properties and make sure it starts automatically)
You will now be able to access your sharepoint via entering network path such as \sharepointhost\application\myawesomeapplication\ etc.
Hope that helps.
If you are trying to do this from the server, test it from a server which is not on the SharePoint farm (or better yet, a client machine). Ensure all of your testing is done from machines which are not on the farm.
Do NOT enable the IIS WebDAV service, as SharePoint provides its own WebDAV service and the IIS one overrides it in the pipeline. Enabling this service is a sure path to breaking WebDAV.
If you have SSL enabled, you may be in for a rough time getting it to work. Start by understanding how to use the 'net use' command, and the #SSL suffix.
make sure your webdav is installed as feature
make the following registry fix (http://support.microsoft.com/kb/841215) :
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WebClient\Parameters
Add a new DWORD "BasicAuthLevel" and change this to "2"
Restart your machine (and make sure it is enabled in IIS)
Make sure that WebClient windows service is running in the server. This shall appear in client operating systems like Windows 7, windows 8 however, on the server operating systems like Windows Server 2008, it shall be installed by enabling the server feature "Desktop experience" using Server Manager
This issue nearly killed me. I found that I was using a 64 bit version of my browser and that is'nt supported. I changed over to the 32 bit and it works.

WCF SecurityException

I am trying to host a WCF service in IIS 6.0 on server 2003. And when I
browse to the server I get the following error.
SecurityException: Request for the permission of type
'System.Net.DnsPermission
Is this related to the permissions granted to the user account the app
pool is running under or some other problem, and how do I fix this.
This might be related to the settings for local Intranet. I am assuming that you are browsing from your PC to the server. Try this:
Connect to the server via Remote desktop (or just use the server console), then browse the service and see if you get the same error.
If you do not get an error:
On your PC add the address of the server to local intranett, then try and browse the service again.
Good luck
Shiraz
To answer the replies.
Yes that was the entire error message Terry. It didn't appear to be a WCF issue but a security configuration problem on the web server that wasn't allowing DNS Permission as required by WCF.
The problem was resolved by uninstalling SharePoint services on that server where the WCF service was being hosted. Not sure still, why SharePoint would change the security permissions.