IIS Manager Error: The process cannot access the file because it is being used by another process. (Exception from HRESULT: 0x80070020)
The above is the exception comes most of the times when you are using the default web site in windows 7. Automatically it will stop the site and when we try to start then the above exception is coming. Because of it, no web sites, applications are running and unable to proceed to any further step. I know that the default web site uses the port number 80 by default. For testing purposes I have changed the port number to 9999 and tried to start the default web site and surprisingly it started and everything running fine. So, I fixed to the problem that the issue is only because of the port 80. I came to conclusion that someone else other than IIS web site is using the port 80.
Now, we found the problem. We need to look for solution. But, how to know who are using the port 80 other than IIS?
Here is the post on it. "How to find what process is using which port?". The helped me a lot to find out the problem in minutes.
Wednesday, July 21, 2010
How to know what process is using which port in windows
I believe this is going to be a very helpful post to most of the readers. So many times I need to know about this. This is a great tip to resolve so many problems. So, it is one of my hot tips for identifying the problems.
We usually install third party software like Skype, TeamViewer etc. in the windows OS, then they will default take some port numbers available. Then there are chances they will create some problem as explained below. [This is why we need to take care of installing software on the servers or production machines. We should install if and only if we really need them. :)] Below is the complete scenario.
We usually install third party software like Skype, TeamViewer etc. in the windows OS, then they will default take some port numbers available. Then there are chances they will create some problem as explained below. [This is why we need to take care of installing software on the servers or production machines. We should install if and only if we really need them. :)] Below is the complete scenario.
Friday, July 16, 2010
More SharePoint 2010 templates in Visual Studio 2010
I am working on SharePoint 2010 these days and all the development is on Visual Studio 2010. The IDE is very cool and great features. Really very helpful for developers and administrators as everything is builtin like deploy, configure and easy development. I really love it. There are plenty of SharePoint 2010 templates are available by default in Visual Studio. Here are some from Microsoft with extra templates. Install them and use them for time saving and learn more...
http://code.msdn.microsoft.com/vsixforsp
http://code.msdn.microsoft.com/vsixforsp
Detect request is from iPad in ASP.NET
iPad. People slowly liking it. Few days ago, I have written a post on how to detect the request is from the iPhone. So, as iPad applications are also growing day to day, I want to give you a small tip on how to detect requests are from iPad. So that you will write logic which is specific to the iPad like html, CSS, scripts etc.
Detect request from iPad in ASP.NET [C#]:
if(HttpContext.Current.Request.UserAgent.ToLower().Contains("ipad"))
{
//iPad is the requested client. Write logic here which is specific to iPad.
}
else
{
//Normal browsers [from computers] requested.
}
Detect the iPad request in Java script:
if (navigator.userAgent.match(/iPad/i)
Very simple, isn't it. Hope this helps.
Detect request from iPad in ASP.NET [C#]:
if(HttpContext.Current.Request.UserAgent.ToLower().Contains("ipad"))
{
//iPad is the requested client. Write logic here which is specific to iPad.
}
else
{
//Normal browsers [from computers] requested.
}
Detect the iPad request in Java script:
if (navigator.userAgent.match(/iPad/i)
Very simple, isn't it. Hope this helps.
Saturday, June 26, 2010
Open all anchor links in new window
I believe this post is going to be very interesting to many people who read this post. Because the first question is what is the need to open links in new window? Is it a big deal to open links in new window? What are the advantages? Why we need to implement this in our sites or blogs?
Take my blog for example. I have write big posts some times and place more links. I want the user to see the links to be opened in new windows as they are still reading my pages. If the link opened in the same page, then it will be a problem to go and come back and start reading from the position they were. That won't give good experience. I want them to be stayed on my blog page and open all the links in new window. So that user is always on my blog page and if they wants then they can move across pages. It's not bad at all.
How many ways are there to implement this?
1. Make all links in web page open in new window.
2. Only some part of the web page links will be opened in new window.
Take my blog for example. I have write big posts some times and place more links. I want the user to see the links to be opened in new windows as they are still reading my pages. If the link opened in the same page, then it will be a problem to go and come back and start reading from the position they were. That won't give good experience. I want them to be stayed on my blog page and open all the links in new window. So that user is always on my blog page and if they wants then they can move across pages. It's not bad at all.
How many ways are there to implement this?
1. Make all links in web page open in new window.
2. Only some part of the web page links will be opened in new window.
Thursday, June 24, 2010
ULS Viewer - SharePoint Log Viewer - A nice SharePoint Tool
In SharePoint, I know the big pain in development is if we get any exceptions or errors in the code we have implemented, then go back to log files and scroll or search to the exception or error details and try to solve it. The notepad file size could be in MB's. It's difficult to maintain and see what was caused the problem very easily. Most of times it frustrates to search and find the corresponding problem as notepad is very slow if log file size is huge. I am always think like, is there any better way to see and find the details without struggling a lot. One way I found was my previous post "How to see actual exception and errors directly on SharePoint web page". But, that won't help always to find the problem.
That is the reason I started to find a good solution for it. Luckily Microsoft understand this and developed a nice tool for us. That is called ULS Viewer. This is the windows application which takes the ULS log file as input and loads the log files very faster than notepad and shows us as grid of columns. You can do plenty of customization to it by sorting, filtering, searching, highlighting etc... You can find the problems in your code in very less time. I find this is one of great and superb tools every SharePoint developer should use. It surely decrease the analysis time on finding exception or error details.
For more details about the ULS Viewer: http://code.msdn.microsoft.com/ULSViewer
For free download: http://code.msdn.microsoft.com/Project/Download/FileDownload.aspx?ProjectName=ULSViewer&DownloadId=7482
For complete documentation: http://code.msdn.microsoft.com/Project/Download/FileDownload.aspx?ProjectName=ULSViewer&DownloadId=7483
So, use it and make your life more comfortable. Subscribe to all my posts and stay with me. I always try to share and help the devs to make development faster with the already existing tools. But, the things is we need to know about them, I will do that part for you. Happy SharePoint development.
That is the reason I started to find a good solution for it. Luckily Microsoft understand this and developed a nice tool for us. That is called ULS Viewer. This is the windows application which takes the ULS log file as input and loads the log files very faster than notepad and shows us as grid of columns. You can do plenty of customization to it by sorting, filtering, searching, highlighting etc... You can find the problems in your code in very less time. I find this is one of great and superb tools every SharePoint developer should use. It surely decrease the analysis time on finding exception or error details.
For more details about the ULS Viewer: http://code.msdn.microsoft.com/ULSViewer
For free download: http://code.msdn.microsoft.com/Project/Download/FileDownload.aspx?ProjectName=ULSViewer&DownloadId=7482
For complete documentation: http://code.msdn.microsoft.com/Project/Download/FileDownload.aspx?ProjectName=ULSViewer&DownloadId=7483
So, use it and make your life more comfortable. Subscribe to all my posts and stay with me. I always try to share and help the devs to make development faster with the already existing tools. But, the things is we need to know about them, I will do that part for you. Happy SharePoint development.
Wednesday, June 23, 2010
SharePoint 2010 ECMAScript Intellisense in Visual Studio 2010
This post is a very big help to the SharePoint 2010 developers. We need the intellisense help to write code fast in our SharePoint applications. But, in SP2010 BETA I faced so many problems to find what methods a java script object has. After written a long post on how to get the java script intellisense working in Visual Studio 2008 this is now an easy for me to do the same on Visual Studio 2010. I just tried the same implementation in VS 2010 and that worked great. So, there I started and started using it in ECMAScript development. When I first see the intellisense working in VS 2010 felt very very happy and jumped into the air. Because, before to find the same methods in the ECMAScript object, I had wasted hours and hours. One of the example is this post "How to know all methods in SP object".
Solution:
By using reference tag everything possible.
Solution:
By using reference tag everything possible.
Tuesday, June 22, 2010
detect request is from iPhone in ASP.NET
The usage of mobiles is growing and growing day to day and most of the users are browsing from their mobiles and do the stuff. So, it is becoming important to support the mobile phones the web sites we are developing. Recently we have developed applications which support for iPhone and I am strongly believing that ASP.NET MVC is the best architecture in all ASP.NET versions.
As we are developing applications it can be accessible from any where and any device including computers, mobiles, iphone, ipod or whatever. But, the important thing is UI. A web site how it looks like on computers is completely different from the mobile. So, we need to detect the user agent or the client who requested the site. So, if request from computer browsers then we don't need to anything as this is the default type. Whereas the request from the mobile phones then we need to render different UI. So, this post will explains that.
Detect request from iPhone in ASP.NET [C#]:
Detect the iPhone request in Java script:
As we are developing applications it can be accessible from any where and any device including computers, mobiles, iphone, ipod or whatever. But, the important thing is UI. A web site how it looks like on computers is completely different from the mobile. So, we need to detect the user agent or the client who requested the site. So, if request from computer browsers then we don't need to anything as this is the default type. Whereas the request from the mobile phones then we need to render different UI. So, this post will explains that.
Detect request from iPhone in ASP.NET [C#]:
if(HttpContext.Current.Request.UserAgent.ToLower.Contains("iphone"))
{
//iPhone is the requested client. Write logic here.
}
else
{
//Normal browsers [from computers] requested.
}Detect the iPhone request in Java script:
if (navigator.userAgent.match(/iPhone/i)
So, depends on the client we will write the corresponding logic in the specific block to switch UI. Hope this helps.
Thursday, June 17, 2010
Read More link to blogger posts without HTML changes
This is really a very helpful post I believe. Most of the times I write long posts and explain each and every part in the solution I found. So, I really need to show only specific length of each post and add a link called Read More at the end of the post on the blog home page. So, that users get chance to see more posts and look more posts. And the loading of the main page will be faster as the content is less. So, there are lot of advantages by placing the read more link on the home page for each post.
I have tried so many solutions and didn't impress by any of them. Some of them are disturbing my HTML as after specific characters add the read more link. Another option is, strip the HTML from the post and add the read more link after specific characters, but that also removes the blog styles for P tag, div Tag or any other custom styles we have applied. Sp, to get this working either we need to change the Blog HTML or add bunch of Javascript code to do that. This is not very easy to maintain and useful. So, what to do, can't I do it? So, after a very long research and read so much I want to give better user experience to my users to read what they want on my blog. Finally came up with a nice and simple solution which do not need much HTML changes or customization.
I have tried so many solutions and didn't impress by any of them. Some of them are disturbing my HTML as after specific characters add the read more link. Another option is, strip the HTML from the post and add the read more link after specific characters, but that also removes the blog styles for P tag, div Tag or any other custom styles we have applied. Sp, to get this working either we need to change the Blog HTML or add bunch of Javascript code to do that. This is not very easy to maintain and useful. So, what to do, can't I do it? So, after a very long research and read so much I want to give better user experience to my users to read what they want on my blog. Finally came up with a nice and simple solution which do not need much HTML changes or customization.
Subscribe to:
Posts (Atom)