Web Deploy to IIS fails. Why? - c#

I am trying to deploy a .net core c# app to an IIS running on Windows Server 2016. I created a publish profile. I click on Validate Connection button and get the following error, that I need to install Web Deploy and that Web Management Service should be started:
I did install Web Deploy 3.6 and the Web Management Service is definitely running.
Here is my profile. The Site Name is AppPool\WebSiteName. User name is the same as I logged in on the server with.
What am I missing?

Figured out the problem. The Server entry needs to have the protocol. So http://winserver instead of just the name of the box.

Related

c#.net Restful API Works on debug/release but not on IIS

I have am creating a restful API application in c#.net. When I compile my application in debug or release mode through iisexpress. It works as expected. I can use fiddler and pass the corresponding arguments in the "GET" like the user credentials and it will connect and get a respond of 200 (http://localhost:49917/v2/Carriers). When I publish my application and deploy it in IIS (http://api.test1.net/v2/Carriers). IIS is install the same computer where I compile my application. Then, I use fiddler and pass the argument necessary I get a respond of 503. I am not sure why is not working. My application pools is the following setting:
.Net CLR Version: v4.0
Managed Pipeline Mode: Integrated
Identity: LocalService (I have tried also ApplicationPoolIdentity)
When I publish my application I use the following publish method: "File System".
I have added the IP Address and the host name in the Host file (windows/system32/drivers/etc/). I am not sure why is not working.
What makes visual studio different in debug/release mode to work as expected from publish version?
I wanted to let you guys know that I did what you guys recommended and I figure the answer. I need to add a new user in the SQL Server Database.
"Accessing Database under IIS APPPOOL\ASP.NET v4.0
As we are using ASP.NET v4.0 App Pool make sure IIS APPPOOL\ASP.NET v4.0 is added to your Database Server -> Security -> Logins."
After I added this new user "IIS APPPOOL\api.test1.net" the api get request with fiddler works as expected with a 200 respond. "api.test1.net" is the name of my application pool in IIS.
Thank you for all your recommendation.

Azure VM IIS Server - Web Deploy

I created Virtual machine in Azure, i set up server, installed web deploy 3.6, management service
But if i want to publish my website to this server i am still getting this error
You could check this blog.
Please ensure web deploy service is listening. Also, you need open port 8172 on Windows Firewall and Azure NSG.

Packaging a .NET web service

I have no prior experience working in the .NET stack. Not sure if this is a common requirement. I have developed a simple .NET web service which accesses the COM library provided by a label printer SDK to send print jobs to the printer connected to my machine.
I need to distribute the web service to clients so that it can be hosted on their machines locally. Set up should be minimum - something like an installer which will do the needful to deploy the web service locally.
I assume that any windows machine comes with .NET bundled.
I understand that IIS is the windows equivalent of apache-tomcat. Does is it come bundled with all windows machines? If it does, I figure I can write some scripts to deploy the web service to IIS using the ".deploy" file generated by Visual Studio.
Are there any betters way of doing this ?
So my question is :
How do I distribute a web service that should be be hosted and run locally on the client's machine without forcing the user to download and install a web server and deploy the package?
Edit:
So, I gather IIS is not supported by home editions.

Deploy WPF Application to IIS

I was wondering how to deploy a wpf application to an IIS application because I have the correct path etc but in the publish wizard when I click...
Browse -> Remote Site -> new web site, then enter the url it gives me an error saying that it is unable to create the website because the server doesnt have front page server extensions installed.
After some googling I found that FPSE has been discontinued and is not recommended for use, so is there a way to deploy a standalone wpf application to IIS with out FPSE?
There are other options for deployment. You can do a network share, just make sure you enter the web address correcly.
http://msdn.microsoft.com/en-us/library/71baz9ah.aspx

How to enable Windows Authentication on ASP.NET Development Server?

We are trying to host a WCF service via the web. We set the web.config to have the service require windows authentication. The problem we are having is the following:
When we host our service in a regular IIS, the service runs fine and there is no issues with the "Windows Authentication" mode. However, when we try to run it from our developer boxes we get the following error: "Security settings for this service require Windows Authentication but it is not enabled for the IIS application that hosts this service."
Our developers boxes are not hosting the service through the regular IIS but rather through Visual Studio's ASP.NET Development Server. We tried going into the web project properties and said to enable NTLM authentication but that still did not fix it. Does anyone know how to fix it? Does VS ASP.NET Development Server even support Windows Authentication? Is the only option for hosting the service with Windows Authentication is to use IIS and forget about ASP.NET Development Server?
In order to configure IIS Express security settings:
look for the IIS express symbol in the taskbar (system tray).
Right click and select "All Applications".
Click on the name of the site you want to change (although I believe the change is site wide)
Click on the path in the config section below (it will open the applicationhost.config file)
Search for the authentication section and make your changes
Example changes can be found here:
http://toadcode.blogspot.ca/2011/08/security-config-in-iis-express.html
ASP.Net Development Server is very limited. It only serves requests originating from the same machine that it is running on, and it will not serve files that are outside of its application scope. It is based on the Cassini server. Cassini does not support WCF web services. Documentation for ASP.Net Development Server says that it does support NTLM. If you are just browsing to a page from the local machine it should work fine unless the page is referencing an unavailable resource.
check out http://msdn.microsoft.com/en-us/library/58wxa9w5.aspx for more info.
I would install and configure IIS on your local dev machine and use that in preference to using the inbuilt webserver. To use local IIS to debug select "User Local IIS web server" on the web tab of the project properties. Using IIS rather than the inbuilt webserver also means that you can configure your app in exactly the same way as it will be configured on the production server and this will reduce the no of potential surprises when you move to the production environment.
The solution to my authorization issue was to go into the F4 project properties and set the following:
Anonymous Authentication: Disabled
Windows Authentication: Enabled
Apparently these properties update the IIS applicationHost.config directly.
http://provenstyle.com/blog/2015/10/02/Visual-Studio-2015-Windows-Authentication-And-IIS-Express/

Categories

Resources