Using ASP.NET Sessions from WCF

This is not a new topic. But interestingly I could not find a good example on the web while I wanted to find one for some other investigation. So I decided to create a sample here to show the following scenario: ·        A WCF service has the access to a ASP.NET session. Different WCF client…

5

WCF Request Throttling and Server Scalability

Two Threads per Request In .NET 3.0 and 3.5, there is a special behavior that you would observe for IIS-hosted WCF services. Whenever a request comes in, the system would use two threads to process the request: ·         One thread is the CLR ThreadPool thread which is the worker thread that comes from ASP.NET. ·        …

13

How to redirect a Url in IIS6/IIS7 and in ASP.NET?

Sometimes you want to redirect users request to a different one when you want to retire old ones but still provide backward-compatibility. David Wang has a good summary on different redirects for IIS in his blog entry. Here I just want to add a few points which have helped people to resolve tricky problems. First…

4

How to use .asmx extension to handle WCF requests?

For backward compatibility, WCF supports easy server-side migration from ASMX to WCF. This is good news for existing ASMX customers. Generally, the clients of ASMX may have server Urls hard-coded with the extension “.asmx”. For example, here is a sample Url: http://www.myserver.com/foo/MyService.asmx After installing WCF on the box, you can let WCF to handle the…

3

How to change HostName in WSDL for an IIS-hosted service?

If you have a web-hosted service “simple.svc” under the virtual application “/simple”, you would probably get the following service address in the WSDL: <wsdl:service name=”SimpleService“>   <wsdl:port name=”BasicHttpBinding_ISimpleContract“ binding=”tns:BasicHttpBinding_ISimpleContract“>     <soap:address location=”http://mycomputer.private.mydomain.com/simple/Simple.svc” />   </wsdl:port> </wsdl:service> The host name “mycomputer.private.mydomain.com” is automatically picked up by WCF. In the real production environment, you would want to…

6

Impersonation with Double Identities

There are two different levels of security that you can use for WCF services: Message level and Transport level. For Transport level, in HTTP case, you can use different IIS Authentication mechanisms to perform client authentication. If you do not carefully set the settings of the WCF binding, you may end up with both security…

2

Virtual Application vs Virtual Directory

People are always confused by these two IIS concepts, especially for the new IIS7/WAS. These are not new concepts. They are available since IIS6 on Windows 2003 Server. However the terms were misused in IIS6 and they are corrected in IIS7 in Windows Vista and higher versions of Windows. Virtual Application What is it? The…

10

IIS7/WAS Installation

IIS7 has a modular design which allows you to selectively install components that are needed. This design is based on the new manifest-driven Componentization technology that was first introduced in Windows Vista. As the IIS site claimed, there are more than 40 standalone feature components of IIS7 which can be independently installed. This is good…

2

What is IIS7?

What is IIS7? What is the difference between IIS6 and IIS7? Here are the simple answers: §         IIS7 is a new revision (version 7.0) of the Internet Information Services that is shipped on Windows Vista and the next Windows Server version. §         The most attractive features of IIS7 are: modular design (thanks to the new…

4

.NET Framework 3.0 and SDK are shipped

Finally, we made it! .NET Framework 3.0 (was called “WinFX”) is shipped today. Here is the download link: http://www.microsoft.com/downloads/details.aspx?FamilyId=10CC340B-F857-4A14-83F5-25634C3BF043&displaylang=en. Here is the SDK download link: http://www.microsoft.com/downloads/details.aspx?FamilyId=C2B1E300-F358-4523-B479-F53D234CDCCF&displaylang=en.

1