Archive for visual studio

Linux grep Command

I already listed few find commands in my previous post but i found they are of not much use when i want to search for a particular string/Word in a Directory.

Was really in need of such a command at ma workplace and then i encountered this  simple comamnd to do this after some browsing…And as Usual i am here to share this with you..

grep -r “String” /filepath…This would search the word in the specified path ex: “c/users/bin”

OR

grep -r “String” *..this would search in all directories

String here is the specific word with which you want to search with

FilePath is the directory where you want the command  to search the specified word.

Hope It helps…:) 🙂

Wud luv to hear comments….

Leave a Comment

Testing Ajax Web Application

Recording and Running the Webtest in Visual Studio seems easy now..(You can see creating the webtest in my previous posts).
It’s well and good if webtest doesn’t fail but what if webtest fails????
There are many reasons why the webtest fails but the most common one (or  i can say which i encountered frequently) is webtest containing the ajax controls or postback functionality fails.
             

The Reason being is that the Web test engine works at the HTTP layer, it does not directly simulate client-side scripting like JavaScript or ActiveX controls. Web tests are concerned with generating load on a server. As a result, client-side scripting that only affects the appearance of a Web page is not significant to the Web test. Client-side scripting that sets parameter values or results in additional HTTP requests (such as AJAX) does affect the load on the server and might require you to manually modify the Web test to simulate the scripting.
That means we need to modify some of the parameters in the webtest to make it to run properly.

How do We Do it??? Here goes the solution and it did work for me….

So i wanted to share this with u all hoping that it may help you. 🙂

So,Just open the window consisting of webtest in Visual Studio,expand the links(involving ajax) and there you can find the folder named Extraction Rules which has Extract Hidden Fields option.(This is where the problem lies).
If u r using Visual Studio 2008 Right Click and select Properties as shown below.

a

This Opens up a Properties window.In that Required field would be true by default.Change this Value to false.

b

 

Do this for all the Hidden files present in the web test.
But it’s the different case when  u r using vs 2005 as there is no Required option then just right click the Extract Hidden Files option and Delete the Extract Hidden Fields as shown.

c

 

That’s it! u r Done!!!! Now just Rerun the webtest after saving the changes made.Now your  Webtest should run properly without any errors.

Also we can use “Fiddler” tool  for this kind of webtests.Go through these links to know more about “Fiddler”.

http://www.fiddlertool.com/Fiddler/help/WebTest.asp

http://blogs.msdn.com/edglas/archive/2007/06/13/fiddler-2-drop-available-at-www-fiddler2-com.aspx

Hope this is useful!!!

Comments are most welcome 🙂

Comments (3)

Failed to access IIS Metabase error.

Hey all,

Today I was working on VS2008 and with the help of “view in browser” option i was trying to view the website but i came across the error “Failed to access IIS Metabase”. I was seeing this error for the first time.So i tried to figure out what the problem was and after a long research i was successfull in finding out the solution for this which i would like to share with you all.

Below i mentioned the problem and solution in detail so go through it.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details:

System.Web.Hosting.HostingEnvironmentException: Failed to access IIS metabase.

The process account used to run ASP.NET must have read access to the IIS metabase (e.g. IIS://servername/W3SVC).

Cause:
Microsoft .Net framework installation registers the framework on the IIS. Beside performing many other configrations in the OS and IIS, it also creates ACLs (Access Control List). .NET framework installation registers the framework in the IIS using ASP.NET IIS Registration Tool (aspnet_regiis.exe). The ASP.NET IIS registration tool allows installation program (or administrator) to update script maps for ASP.NET applications to point to the ASP.NET ISAPI version that is associated with the tool.

Solution:
Run the following in the Command Prompt (cmd.exe)
C:\Windows\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis -i
-i switch is used for installing ASP.NET and upgrading all application pools to ASP.NET version which came with the ASP.NET IIS Registration Tool. It will ignore the previous version of application pool. Please note that the above command will only affect the applications that are currently mapped to an earlier version of ASP.NET.

The following command will install the script maps pointing to the ASP.NET version that is associated with the ASP.NET IIS Registration Tool to the application “App1”.
aspnet_regiis -s W3SVC/1/ROOT/App1

Hope this helps… 🙂

Happy Coding.

Leave a Comment