ASP .Net 2003 : Error while trying to run project: Unable to start debugging on the web server. Server side-error occurred on sending debug HTTP request.(HTTP/1.1 500 Internal Server Error)

My friend copied his project from another machine to his machine, project was in asp .net 2003 fromat, which was working well in old machine. But when he tried to run it(for debugging purpose) from visual studio 2003 it gave following error :
—————————
Microsoft Development Environment
—————————
Error while trying to run project: Unable to start debugging on the web server. Server side-error occurred on sending debug HTTP request.
Make sure the server is operating correctly. Verify there are no syntax errors in web.config by doing a Debug.Start Without Debugging. You may also want to refer to the ASP.NET and ATL Server debugging topic in the online documentation.
—————————
OK   Help
—————————
Even we tried to run using url http:\\localhost\virtual_dir_name\page.aspx, but it was still giving error something like ‘HTTP/1.1 500 Internal Server Error’. Finally after searching over net we found following solution at byte.com.
For us second solution worked. We did following step:
1.Deleted ASPNET windows user account (from control panel->User Accounts->Users Tab)
2.And then in command prompt(cmd, not vs command prompt) went to framework directory, i.e., in our case
C:\Windows\Microsoft.NET\Framework\v1.1.4322 and ran the command “aspnet_regiis -i” (to re-register the Framework 1.1 and reinstall ASPNET user).
And bingo !!! it worked without even restarting the machine/server.
Above solution solution also solved following problem.
We also faced the problem on creating new web project using asp.net 2003 on same machine, got the error:
—————————
Microsoft Development Environment
—————————
The Web server reported the following error when attempting to create or open the Web project located at the following URL: ‘http://localhost/WebApplication1’. ‘HTTP/1.1 500 Server Error’.
—————————
OK   Help
—————————

Reference:

Advertisements
Published in: on June 2, 2010 at 10:07 am  Comments (2)  
Tags: ,

ExtJS Error: invalid label error while using ScriptTagProxy for JSON data in Paging Grid Example

You can also read this post if you are getting above error while using ScriptTagProxy.

With little bit modification i was trying to use Paging Grid Example from ExtJS. And that where i was getting following error:

invalid label
    {"success":true,"totalCount":

Actually it was not filling my grid, while examining with firebug i got above error. After banging my head over internet i found the reason ;).
Actually it is using ScriptTagProxy to get json data from server. I was sending pure json from server which is not the correct way. ScriptTagProxy sends a url parameter called “callback” which is function name. You need to take this param and form a parameter call. For example callback=fun1 is comming from server, then what you need to do is enclose your json with fun1(yourJSON) call.
like:
fun1({—-your json—-});

Following is an example of ASP.Net code for it:

 String json_string= //"some json here";
 String callback_function_name= Request.Params.Get("callback");
 String response_string = "";
 if (!String.IsNullOrEmpty(callback_function_name))
 {
 response_string = callback_function_name + "(" + json_string + ")";
 }
 else
 {
 response_string = json_string;
 }
 Response.Write(response_string);

you can see the difference of data comming from server for Paging Grid Example. Open following two url:

http://extjs.com/forum/topics-browse-remote.php
http://www.extjs.com/forum/topics-browse-remote.php?callback=fun_1

After examining the data on your browser you will see that, first url is giving pure json, while second one is giving json enclosed in fun_1() function call. ScriptTagProxy is expecting the second data not the pure json one.

If you have any suggestions please feel free to comment.

Published in: on December 2, 2009 at 7:47 pm  Comments (6)  
Tags: , , ,

Sorting a number field in MySQL: Making order by work for number fields in mysql

When using Order By field having number doesnt work some time. Actually it tries to sort the fields considering them as string, so numbers 11,2,1,111,21,3 will be sorted like:
1,11,111,2,21,3
which is not desired, it should be:
1,2,3,11,21,111

To order the values as they should be, simply use the SQL ABS function.

to get this desired result use query like:

SELECT * FROM ‘myTable’ WHERE b=’abc’ ORDER BY ABS(price) ASC

here price is number field.

Published in: on November 18, 2009 at 11:36 am  Leave a Comment  
Tags: ,

How To display table in GridView: Dynamically filling data in GridView from DataTable in ASP .Net

I had a datatable and i needed to show in a GridView in my ASP .Net page. Following is the code which help me to do so.

//get table to be shown in grid view;
DataTable dataTable = GetRequiredTable();
//assing table to the DataSource property of GridView
myGridView.DataSource=dataTable;
//bind data from a data source to the GridView control
myGridView.DataBind();

Here GetRequiredTable() is a user(example) function which return a table to display in to gridview.
You can also use DataSet in place of DataTable.

Published in: on November 17, 2009 at 10:27 am  Leave a Comment  
Tags: , ,

not able to delete eclipsed item (files) in clear case: sudden crash of system made file corrupt

I was working on clear case dynamic view and suddenly my system got crashed. after that i was not able to open the file on which i was working. It was looking like eclipsed item on clear case explorer.

I was also not able to delete this file. But finally i got the solution to delete the file.

Here is one thing i want to say before trying my way just try to delete the eclipsed file using following links:

http://www-01.ibm.com/support/docview.wss?rs=984&uid=swg21132484
http://www.cmcrossroads.com/forums?func=view&catid=31&id=69343

if you tried every thing still not able to delete. then here is the way to do it:
(this will not recover your work, if you forgot to check in.)
1. check in every file (except eclipsed one as you will not be able to do so.)
1. delete view shortcut.
2. reconfigure it.

if its still not working then:
1. create new view with same config spec
2. create shortcut for it.

Above described method should be used at last after you have tried every thing else.

Published in: on November 16, 2009 at 7:09 pm  Leave a Comment  
Tags: , , ,

DCOM Error : Retrieving the COM class factory for component with CLSID {000209FF-0000-0000-C000-000000000046} failed due to the following error: 80070005.

When we tried to use word automation from .Net in ASP .Net application earlier it was working but then it stopped working in some of the machine giving error
“Retrieving the COM class factory for component with CLSID {000209FF-0000-0000-C000-000000000046} failed due to the following error: 80070005.”.
We had DCOM setting in place, IIS setting was also ok. Then I got following solution:

  • I changed the AppID Registry key under HKEY_CLASSES_ROOT\AppID\WINWORD.EXE from old entry to {00020906-0000-0000-C000-000000000046}.

(for some it will work after this, but if still its not working go for second.)

  • 2. Also changed the DCOM setting.
    • a. Open the Component Service Console.(Either by running command: dcomcnfg OR by opening it from Control Panel->Administrative Tool -> Component Services)
    • b. Now Select ‘Microsoft Word Document’, Under Component Services->Computers->My Computer -> DCOM Config.
    • c. Do Right click and select Properties.
      it will open Microsoft Word Document Properties dialog.
    • d. In Microsoft Word Document Properties dialog, select Identity tab.
    • e. In Identity tab, if ‘The launching user.’, in our case third option was selected, so we selected 2nd option.

This may solve out problem, hope it would be helpful for you also. If you need to say something please feel free to speak through comments.

 

References:

http://social.msdn.microsoft.com/Forums/en-US/netfxbcl/thread/006cbbac-101a-40ea-ae16-d59a7a2da8b1

Published in: on November 3, 2009 at 4:17 pm  Comments (7)  
Tags: , , , , , , ,

The CLR has been unable to transition from COM context 0xXXXXXX to COM context 0xXXXXXX for 60 seconds. The thread that owns the destination context/apartment is most likely either doing a non pumping wait or processing a very long running operation without pumping Windows messages

Error Message:

“The CLR has been unable to transition from COM context 0x1979d8 to COM context 0x197868 for 60 seconds. The thread that owns the destination context/apartment is most likely either doing a non pumping wait or processing a very long running operation without pumping Windows messages. This situation generally has a negative performance impact and may even lead to the application becoming non responsive or memory usage accumulating continually over time. To avoid this problem, all single threaded apartment (STA) threads should use pumping wait primitives (such as CoWaitForMultipleHandles) and routinely pump messages during long running operations.”

You get this nasty error message and your life is sucked. This happens when you are debugging your application and using breakpoints.

Fix For The Problem:

Go to menu Debug->Exception-> a form appears. Then in Managed Debug Assistants section, just uncheck the ContextSwitchDeadlock.

Note:

If you are not able to see Exception MenuItem in debug menu, then add it from Tools->Customize->Commands.