Showing posts with label IIS. Show all posts
Showing posts with label IIS. Show all posts
Saturday, November 25, 2017

Video: How to use IIS Express with Visual Studio Code

Visual Studio Code is a Great Editor by Microsoft being Developed Open Source on Github and It is gaining lots of popularity and lots of Developers are using for creating applications in various languages. Their lots of features that are there for Developers and Still lots of features is not been explored or lots of useful extensions are not being explored. So I am creating few videos for explaining it’s feature and this video is one of that features.

IIS Express is a built-in web server for C# applications with Visual Studio and lots of Developers are using this. This video explains how we can use IIS Express with Visual Studio code. Please have a look at it and let me know how it was.



The plugin used in this video can be found at following location.
https://marketplace.visualstudio.com/items?itemName=warren-buckley.iis-express

And If you don’t know what is Visual Studio code then you find more about it at following location.
https://code.visualstudio.com/

Stay tuned for more!!.
Share:
Wednesday, March 6, 2013

Tip- InProc session state was not working with IIS7.5

In this post I am going to explain about reason for InProcsessionState was not working with IIS 7.5.

Problem:

Yesterday in one of my PC I got updated IIS 7.5 and suddenly after updating the IIS my ASP.NET application session state stopped working. It was a very weird behaviour and after doing some R and D I have found that my worker process per application was more then one.

That was the reason for the  session state was not working as “InProc” session state is using IIS memory to manage sessions.  You can find more information about this in following link.

http://stackoverflow.com/questions/2147578/asp-net-session-state-and-multiple-worker-processes

Resolution:

There are two ways of resolving this problem.

1) You can use other session state mode like State Server or SQL server which supports multiple worker processes.
Share:
Tuesday, March 23, 2010

IIS Error: The process cannot access the file because it is being used by another process.

Recently in our one of the web servers all the sites using port 80 were stopped and when we tried to restart website it was giving error like process cannot access the file because it is being used by another process. After analyzing and diagnosis and searching on internet for the same problem i have found that it was a problem due to port 80 was used by another process. To solve the problem i have following command which will list IPs,PID(Process ID) and port that used by the process. The command is as below.

NETSTAT -ano
After running that command in command in command prompt it will give output like following.

IIS Error, IIS 6.0, IIS 7.0

From that output you can fine which port is used by which PID(Process Id). And then you can find the process from task manager. Process Id column in task manager is not enabled by default so you can do by View Menu->Select Column a following dialog box will appear.

ProcessId

Select PID (Process Identifier) and press OK.Now process Id will appear in task manager and in task manger go to processes tab where you can find out process by checking process id column then select that process right click->click End Process that will kill that process. Now again try to restart the IIS Site it will restart. In my case it was java updater who is using same port 80 and after killing my IIS Sites were ok. Hope this will help you..

Technorati Tags: ,

Shout it
kick it on DotNetKicks.com
Share:
Saturday, March 20, 2010

ASP.NET and Load balancing.

In one of our project the site usage of site was very heavy and we need to migrate it to load balancing server. I have never configured the sites in the load balancing server but it was quite interspersing experience Here are the some points which we need to take care while we move asp.net sites into the load balancing environments. So first we will see what is load balancing.

Following is a load balancing definition from the Google.

In computer networking, load balancing is a technique to distribute workload evenly across two or more computers, network links, CPUs, hard drives, or other resources, in order to get optimal resource utilization, maximize throughput, minimize response time, and avoid overload.

Following are the points which you need to take care when you are deploying your asp.net sites into load balancing server environments.

Machine Key Should be same for both servers: View state and session both are depends on the machine key. If you machine key is not same then you will have problems related to session and view state you may loose your session and view state in between request during post backs. If machine key will not be same then its possible that you can get strange result in Ajax requests. There is a machine key section in web.config where you can specify machine key.

<machineKey validationKey='C44B8B7C521CB5BC7E602BAE6118AA44CD690C7304817129DA27C17E800132A1BD946C6D9AD12F0A5B342840C7D130564195428160B7466146938CA9E3A62686'   decryptionKey='0E9DF2DA7F210B84087690FF0BF25C905182AD81E16A5FA9'   validation='SHA1'/>
Session Configuration: Any web application is not possible without having session as web pages are stateless so you can configure session in load balancing also. There are two configuration which can be used in load balancing environments. One is state service and another is Storing session in SQL Server.

Following is a good link to learn how you can configure sessions state in asp.net application.

http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/0d9dc063-dc1a-46be-8e84-f05dbb402221.mspx?mfr=true

And here is a good link to configure session on SQL Server.

http://support.microsoft.com/kb/317604

You can configure session state mode in your web.config like following.

<sessionState mode="SQLServer" StateConnectionString="tcpip=127.0.0.1:42424"

SqlConnectionString = "data source=SERVERNAME; user id=sa; password=sa"

cookieless="false" timeout="20" />

enableViewStateMac="false": This is a alternative approach to machine key. This will tell asp.net engine that whether it should check Machine authentication check or not and if you made it false then it will not check for machine authentication. You can define that in your web.config pages section like following.
<system.web>
<pages enableViewStateMac="false" />
</system.web>
Caspol Utility: You can use caspol utility to share some resources on between load balancing servers. Like we have file base cache dependency in our application so we have created a central location(A shared folder for cache files) for the both the server and used Caspol utility to give full trust share on that folder for load balancing servers. Following are some of the good links to which will teach how you can use CasPol utility to for asp.net application

http://blogs.msdn.com/shawnfa/archive/2004/12/30/344554.aspx

http://forums.asp.net/p/1119925/1881331.aspx#1881331

http://www.eggheadcafe.com/software/aspnet/30227544/caspol-addfulltrust.aspx

File Replication:File Replication is also an important features of load balancing you should have replication enabled on the folders of web application so if you upload anything on one server it should replicated to other sites. Following is good link to understand file replication.

http://www.tgrmn.com/web/kb/item28.htm

Sticky Sessions:
In some scenario Sticky session is very useful. In one page our application we have used extensive Ajax and we need that for each request and partial post back it should stay on one server till request completes.To achieve that we can used sticky session. Following are some good links to know about sticky sessions.

http://dev.fyicenter.com/Interview-Questions/JavaScript/What_does_the_term_sticky_session_mean_in_a_web_.html

http://blogs.msdn.com/drnick/archive/2007/07/13/sticky-sessions.aspx

Hope this will help you on deploying your asp.net on load balancing sites. Following are some good links for understanding load balancing in more details

http://technet.microsoft.com/en-us/library/bb742455.aspx
http://support.microsoft.com/kb/323437
http://technet.microsoft.com/en-us/library/cc754833%28WS.10%29.aspx.
http://edge.technet.com/Media/Network-Load-Balancing-NLB-in-Windows-Server-2008/

Shout it

kick it on DotNetKicks.com
Share:
Sunday, July 19, 2009

IIS 7.0 URL Rewrite Module 2.0 Beta Version is out now.

Url rewriting is an important feature that will enable application to be search engine friendly and make url more readable. IIS 7.0 comes with built in url rewriting module so you don’t need to write more code for url rewriting module. URL Rewriting module will do following for you.

  1. Replace the URLs generated by a web application in the response HTML with a more user friendly and search engine friendly equivalent
  2. Modify the links in the HTML markup generated by a web application behind a reverse proxy.
  3. Fix up the content of any HTTP response by using regular expression pattern matching

You can download IIS 7.0 URL Rewrite Module 2.0 Beta Version from the following.

http://www.iis.net/downloads/default.aspx?tabid=34&i=1904&g=6

It is containing following features.

  1. Rule base url rewriting Engine
  2. Regular Expression Pattern Matching.
  3. Wild card pattern matching.
  4. Global and Distributed rewrite rules.
  5. Access to server variable and http headers.
  6. Various Rule Actions
  7. String manipulation features.
  8. Support for IIS kernel mode and user mode output caching
  9. Failed Request Tracing Support
  10. Rule Templates
  11. UI for testing of regular expression and wildcard patterns
  12. UI for managing rewrite rules and rewrite maps
  13. GUI tool for importing of mod_rewrite rules

For more details about IIS 7.0 Url Rewriting modules visit following links.

http://learn.iis.net/page.aspx/460/using-url-rewrite-module/

http://ruslany.net/2009/07/url-rewrite-module-2-0-for-iis-7-beta/

http://www.15seconds.com/issue/081205.htm

Share:
Wednesday, June 10, 2009

IIS 7.0-Search Engine Optimization toolkit-Microsoft

Before few days Microsoft has launched new Search Engine Optimization Toolkit which will increase search engine optimization for the site hosted by Microsoft IIS Servers. IIS search engine optimization toolkit will help web server administrators, hosting provider to improve their search engine optimization. It will controls the site content more search engine friendly. It has some of the following features.

- Improve search engine optimization by site analysis. Site analysis module contains lots of report which will help to improve your site for search engine optimization.

- It also control how search engine access and display your site pages and content with robot Exclusion modules

-It also has Sitemap and Sitemap Index features which will display user sitemap into simple user interface.

Following are some of link for more details about search engine optimization tool kit for IIS.

http://www.iis.net/extensions/SEOToolkit

http://learn.iis.net/page.aspx/639/using-iis-search-engine-optimization-toolkit/

http://learn.iis.net/page.aspx/640/using-site-analysis-to-crawl-a-web-site/

http://forums.iis.net/1162.aspx

http://learn.iis.net/page.aspx/641/using-site-analysis-reports/

http://blogs.iis.net/bdela/archive/2009/06/05/search-engine-optimization-using-iis-seo-toolkit.aspx

http://weblogs.asp.net/scottgu/archive/2009/06/03/iis-search-engine-optimization-toolkit.aspx

http://blogs.msdn.com/cdndevs/archive/2009/06/03/the-art-of-seo-and-iis.aspx

You can download Search Engine Optimization toolkit from here.

http://www.iis.net/extensions/SEOToolkit

Cheers.. Happy Programming..

Share:

Support this blog-Buy me a coffee

Buy me a coffeeBuy me a coffee
Search This Blog
Subscribe to my blog

  

My Mvp Profile
Follow us on facebook
Blog Archive
Total Pageviews