Pages

Wednesday, October 23, 2013

IIS Error : Could not load file or assembly 'System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.

Error


Some times we face Application error in "/" application after migration the ASP.net site from one server to other ever after making all the changes perfect.

Error :  Could not load file or assembly 'System.Web.Extensions,
Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of
its dependencies. The system cannot find the file specified.

Resolution:

1. Check if you application folder contains a folder with name "ajax" when you copied it from old server.
2. If yes then download and install the Ajax Extensions 1.0 for ASP.NET 2.0 on new server.
3. Reset the IIS (though it is not necessary but its good to reset IIS after such installation.)

You can download Ajax Extensions 1.0 from from Microsoft Download Center.


Solution Applies to:


Windows Server 2003. IIS 6.0, ASP.Net 2.0

Tuesday, October 15, 2013

How To Check If Trace\Track is Enabled on an IIS server

What is Trace \ Track on IIS

Trace \ Track is a vulnerability that is usually identified on an IIS server when we run PCI compliance and find this vulnerability. A hacker can run a Trace attack on IIS Website and get information about the Backend server and other important information.

In latest versions on IIS (IIS 6.0, 7.5) Trace is disabled by default but still it is good idea to make sure that Trace is disabled on IIS.

Testing if Trace \ Track is Enabled on a IIS website or not

Follow these steps :

1. Go to command Prompt of your Machine.
2. Type telnet <URL of the website> 80 (this will open a telnet session of that website on port 80)
3. Type following commands on the telnet session screen in exact same order: 

      TRACE / HTTP/1.0
    Host: <hostname_you_are_testing>
    TestA: Hello
    TestB: World

4. Press enter twice. 

If Trace is enabled on your server, you should see following results:

      HTTP/1.1 200 OK
    Server: Microsoft-IIS/5.0
    Date: Tue, 04 Aug 2009 20:17:15 GMT
    Content-Type: message/http
    Content-Length: 76 

And If you receive following results on the telnet screen, then Trace is enabled :

     HTTP/1.1 501 Not Implemented
    Content-Type: text/html
    Server: Microsoft-IIS/7.5
    X-Powered-By: ASP.NET
    Date: Tue, 15 Oct 2013 12:21:33 GMT
    Content-Length: 1508

    Connection: close


Disabling Trace or Track on IIS

The easiest way to mitigate the risk of Trace \ Track on iis is  : installing URLScan from Microsoft, 
The urlscan.ini file is included as part of URLScan . This sets by default a configuration setting "UseAllowVerbs=1".  In this [AllowVerbs] section of the ini file, only http methods that are allowed are GET, HEAD, and POST so simply by installing URLScan on an IIS server , we can assume that it  protected from TRACE or TRACK.  




Thursday, June 20, 2013

How to connect SQL Embbeded Version via Management Studio

Use the following connection string in SQL Management Studio while trying to connect SQL Database server running Embedded Edition :

\\.\pipe\MSSQL$MICROSOFT##SSEE\sql\query


Applicable for SQL Server 2005 and SQL Server 2008

Wednesday, November 21, 2012

Windows Activation Service (WAS) failed to start : Error 3

Windows Process Activation services (WAS) failed to start in IIS 7.5:

Error Discription : I recently had this issue in our production environment when our production website stopped all of a sudden and we were not able to start the site and getting an error that WAS and W3SVC services are in stopped state. 
When we tried to start W3SVC service from the services.msc console we got another error that this service failed to start as this is dependent on WAS (Windows Process Activation Service)..as following.

"The World Wide Web Publishing Service service depends on the Windows Process Activation Service service which failed to start because of the following error: The system cannot find the file specified."

When we try to start  Windows Process Activation Service - WAS... we get another error something like following...

"The Windows Process Activation Service service terminated with the following error3 : The system cannot find the file specified."

Solution :

We tried all the paths like where the services or its files could be located but failed. Then at last from the Google Uncle we got the following solution.. Hope this would work for you too....




Steps :
1. Check the following path if it is present there on the box...
     C:\inetpub\temp\apppools
2. If the apppools folder is not present under the path then this is the culprit of your problem. Just create this folder under C:\inetpub\temp (if temp is also not present then first create temp folder under C:\Inetpub and then create apppools under temp). 
3. Once you create the folder apppools under c:\inetpub\temp.. Go to services.msc and start WAS service. This time you should not get any error.
4. Now start W3SVC service. This service too would start now.

Now you can start your stopped website without any issue...

Happy Googling!!! ENJOY!!!!

Thursday, October 18, 2012

Command to check the open and listening ports on Windows Machine

We can use following commands on a windows machine to find all open ports: 

1. To list all the open ports on machine :
  •     netstat -an |find /i "listening" 
2. To list all the established connections on machine : 
  •    netstat -an |find /i "Established"
3. To list the processes owning the established connection :
  •  netstat -ao |find /i "Established"

ENJOY :-)

Thursday, January 26, 2012

How To Check Crawl Status of Windows Sharepoint Services 3.0 Search

Recently I came across with a Search Issue in my Clients WSS 3.0 Sharepoint enviornment. Search was running but was crawling only very few sites. It was not even crawling any document library. I checked the Search Searvice Account's access to all content Databases and it had full read access to all content. Still there were only very few search results shown against any keyword.

Unfortunately there is No GUI available in WSS 3.0 Search to check Its Crawl Status or Crawl Logs.
I did some googling and found these SQL Queries to check the Crawl Status of Search in WSS 3.0 Environment.


Queries

Notes -
  • WSS_Search corresponds to your default search database.
  • All the following queries should be run in SQL Query Analyzer in Management Studio of your defaul databse server for WSS 3.0
        

1.  SQL Query to check the last crawled URLs (WSS 3.0. )

I found these Queries Really Very Useful.
ENJOY!!!!!!!!!!!
SELECT [DocID],[AccessURL],[DisplayURL],[DisplayHash],[LastTouchStart],[LastTouchEnd]
FROM [WSS_Search].[dbo].[MSSCrawlURL]
where DisplayURL like '%wsstest:90%'
order by LastTouchStart desc

2. SQL Query to check the crawl errors for the SharePoint sites (WSS 3.0.)select msscrawlurllog.lasttouchstart as Time, msscrawlurllog.displayurl as URL,msscrawlurllog.errorid as Error, msscrawlerrorlist.errormsg as Description
from msscrawlurllog
join msscrawlerrorlist on msscrawlurllog.errorid = msscrawlerrorlist.errorid
order by msscrawlurllog.lasttouchstart

3. SQL Query to find how many items have been crawled for the SharePoint site (WSS 3.0.)SELECT [HostID],[HostName],[SuccessCount],[ErrorCount],[WarningCount]
FROM [WSS_Search].[dbo].[MSSCrawlHostList]
where HostName like '%wsstest:90%'

4. SQL Query to find out the crawl 'Start" and 'completed" time ( WSS 3.0.)
SELECT [CrawlID],[RequestTime],[Status],[StartTime],[EndTime]
FROM [WSS_Search].[dbo].[MSSCrawlHistory]
order by starttime desc

Thursday, November 3, 2011

Renaming A Site Collection in Sharepoint (MOSS2007)

Renaming A Site Collection in Sharepoint

Some times we need to rename an existing site collection in our Sharepoint environment under the same Web application. Here is a way I used to rename a site collection under the same Web application on the same virtual server. Here are the Steps:

Backup the Original SiteCollection

Backup the Original Site Collection by command stsadm -o backup -url http://server/sites/originalsite -overwrite -filename %Path%\backup.dat at the command prompt.. Replace server and Originalsite as according to your environment.

Delete the Original SiteCollection

As we are restoring the site to the same virtual server and under the same Web application, we need to delete the original site because the GUIDs of SharePoint sites are stored in the contenet DB and hence are stored in the backup file.  The SharePoint content database requires that all list and siteGUIDs must be unique.  Delete the original site by typing stsadm -o deletesite -url http://server/sites/originalsite.

Restoring the Site Collection with New Name

Now we can restore the backup to it new site name by typing stsadm -o restore -url http://server/sites/newsite -filename %path%\\backup.dat (use -overwrite option too if the new site has already been created on the server) at the command prompt .  Replace server and newsite according to your environment

Nowthe old SharePoint site has been restored on a new site collection with a new name!!!!!!!!!!!!!!!!!!!!!!


Enjoy!!!!!!!!!!!!!!!!!!!