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

Monday, October 3, 2011

Https with IIS 7~7.5, Testing asp.net application in https protocol

In this short blog I am going to share a pretty simple information and which can be very useful in some cases, and it is running asp.net application in https and testing it in locally.

Of Couse we have the option to use IIS Express and web matrix for that purpose. But I am going to share how we can do it using IIS.

First thing is that we have to transfer whole default web application’s binding to https.

image

Right click on the default Web site of  and select edit bindings, this will bring out the following window.

image

We can see where that https is already been configured, its because I have already configured it.  How click on add to add a new binding. This will bring another modal window.

image

In this window you have to select type == “Https” and select SSL certificate, we have used IIS Express Development Certificate, for testing but you can add your own certificate. How you can also choose to view the certificate information.

image

That’s it now click on ok to apply and dismiss the window. click on to ok to other opened window to apply the changes.

image

Now try browsing the same site using https protocol, for instance https://localhost/myapplication where my application is a normal asp.net application. And you would see the browser warning for the first time. Its because we have used a development certificate. click “Continue to this website” to continue.

Thursday, February 4, 2010

Exposing your local IIS to network in Windows XP.

Introduction

Hi, in this post I am going to share a simple knowledge about IIS. The knowledge is about how to expose local IIS to network, so that other network users in team can access and use the functionality.

In a web application development team we might want to check our web sites not only in our local pc but also from other team members machine. That's why its necessary to expose IIS to network environment. Lets say we have a web application called "myweb" normally while development if we use iis we access the myweb as "http://localhost/myweb" well it works all the time.

Lets say our developers PC is "MYDeveloperPC" we can expose the local IIS to share with team members as "http://MYDeveloperPC/myweb". If we have windows firewall enabled by default its not exposed to network. so we got to expose it explicitly. Bellow I am providing a simple screen cast.

Step 1:

Go to control panel and open windows Firewall. Now switch to advance tab, now select "Local Area Connection" and click on the settings button. After that advance settings tab will popup.

Step 2:

Bellow the advance settings window is displayed. Now select the services you want to expose to network and click ok to commit. That's it your local iis now exposed to network and your team members can access it from there pc.

Key Notes

Its a relatively pretty simple knowledge, almost every developer knows it. But still I took the liberty to share it because, one day one of our senior developer complained that his IIS can not be accessed out side his pc. Then I showed to him, where to pock.

A things must be considered, this post is related to the problem of windows firewall. If third-party firewall is installed in the developer pc. user must allow in the third-party firewall as well.

Best of luck and happy programming.

Thursday, September 11, 2008

Install WCF & Asp.net in IIS7

II7 is the default Internet information server for Window vista and window server 2008. In few cases I found that WCF and asp.net 2.0 is not working in iis7. This short of problem is often encountered, if you install dot net framework first and then install IIS7.

To resolve any kind of issue regarding this short of problems an easy way out is to reregister asp.net to IIS and register service model stuff to iis7.

Register Asp.net

To register asp.net go to your visual studio command prompt and type "aspnet_regiis -i" this will install and set all configuration to iis7. provided you have dot net 2.0 and later available in your machine. window vista by default have dot net 3.0.

Register WCF

To register wcf service to iis you got to run another tool called "ServiceModelReg.exe" this tool is located in "C:\WINDOWS\Microsoft.NET\Framework\v3.0\Windows Communication Foundation" directory. Provided that "c:" contains your windows directory. open the command prompt and go to the above mentioned directory with "cd" and run "ServiceModelReg.exe -i", that's it you are done. 

A Special note

Same procedure can be used to resolve any issue in widows XP and windows server 2003. To work above things in windows vista you must run the command prompt with "run as administrator". For this right click on the command prompt and select run as administrator.Best of luck and Happy programming.