Showing posts with label IIS. Show all posts
Showing posts with label IIS. Show all posts

4/16/2014

Remote Web Deployment to Azure VM

Visual Studio Environment offers different types of web-site publish. One of them is Web Deployment. This option allows user to directly publish application to a server IIS remotely. However there are steps to be followed before using this feature:

  1. Install web deploy in the Azure VM. You need to choose full installation, the deployment related service will automatically be started( or you can run the command net start msdepsvc) Link http://technet.microsoft.com/en-us/library/dd569059(v=WS.10).aspx
  2. Default port for web deploy is 8172. You can either choose to use it or define your own port. You can set this port via IIS> Click Server> Management Service ( you need to stop service to configure)
  3. Add endpoint using Azure Portal. Click Virtual Machine and select your machine. Click endpoints and add new TCP endpoint, both public and private ports should be 8172
  4. Right click your project and click publish. Choose Web Deploy. In your server settings, server name should be your virtual machine path with 8172 port. 

4/27/2012

Fixing 403 Problem

Today, I encountered an interesting problem related with IIS.Although the page is loaded normally, random postback calls was resulted in HTTP 403 error. (The request entity is too large) The problem started to occur after we changed http binding to https (secure) binding with a specific port. After some google search, I found SSL related old IIS articles and some config parameters related to this problem. Generally the problem is caused by downloading/uploading big pictures. However in my case there is not a big picture or any data that exceeds few KBs. Still the problem was persisted. I just changed uploadreadaheadsize  in adstuil.vbs and the problem seems to be solved.
The file that is changed is:
Intetpub>AdminScripts>adsutil.vbs
The required command to change the related parameter:
csscript adsutil.vbs(full path) w3svc/1/uploadreadaheadsize [INTEGER]

By the way the reason that SSL limits the size is to prevent DOS attacks. So be ready for anything if you change size...

Resources:
http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/7e0d74d3-ca01-4d36-8ac7-6b2ca03fd383.mspx?mfr=true
http://blogs.msdn.com/b/jiruss/archive/2007/04/13/http-413-request-entity-too-large-can-t-upload-large-files-using-iis6.aspx

10/26/2011

Deploying a web service to IIS

Web services can be used in IIS without publishing it.Even virtual directory may not be necessary if IIS is working properly. I just copy asmx files, config and bin directory. Web service dll are created when studio builds the solution. Therefore publishing is not necessary for dll file. After copying files to wwwroot(or any virtual directory) we are okay to run it in browser.

Possible errors that you may encounter:
1)sgen.exe error : If you get sgen error while dealing with web services, you should change Generate Serialization Assembly option to Off. It is found in solution properties>Build tag.

2)File directory permission error: Most servers do not allow programs to create folders or files without permission. In our case, web service creates a file in TEMP directory because web service is used without publishing it. We need to allow all users to modify this folder.(WINDOWS>TEMP)

3)web.config error : The web.config that we copied may cause error in IIS. Changing appropriate lines fixes the problem. In my case web.extentions caused an error in config. I just deleted these lines because i didnt use any extention components in my web service.