Showing posts with label run. Show all posts
Showing posts with label run. Show all posts

Wednesday, March 28, 2012

Strange compiler behavior after CS0006 error

yesterday i started getting this strange error when i try to run my asp.net
project:

Compiler Error Message: CS0006: Metadata file
'c:\winnt\microsoft.net\framework\v1.1.4322\tempor ary asp.net
files\spsweb\0e3514bf\cb1844e7\assembly\dl2\3b163f
16\00452d31_84e5c301\infragistics.webui.ultrawebgr id.v3.dll' could not be
found

I could get around it with either restarting vs.net or force a rebuild of
the entire solution.
I know that the file in the error is a third party control and have already
contacted the creators about it. But i think this is only a sympton of a
bigger problem.
I found a new strange problem today: i created a listbox and a button
(standard asp.net controls) on the form but there events do not fire
properly. The selectedindex change event on the listbox goes through the
page_load (as normal) but doesn't go through the code in the event itself
and the click event ont the button doesn't do anything (put breakpoint
everywhere no code is executed). Both have autopostback, enabled viewstate
and all other properties set right.
It seems that i can do all the normal things in code that already existed
before the strange compile error started but any new code behind new events
is simply ignored.

Can anyone shed any light on these wierd problems ?

Kris Vanherk
Ferranti Computer SystemsHi,

I'm having similar problems, for the last couple of days I have problems
each time I debug a ASP.NET application, it says that cannot access a temp
dll it creates in C:\WINNT\Microsoft.NET\Framework\v1.1.4322\Tempora ry
ASP.NET Files\web_application_name

I have to restart the service to keep it running again.

I'm trying still to figure out what is going on.

Cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"Kris Vanherck" <KVanHe@.ferranti.be> wrote in message
news:%23BsTeb5JEHA.3412@.TK2MSFTNGP09.phx.gbl...
> yesterday i started getting this strange error when i try to run my
asp.net
> project:
> Compiler Error Message: CS0006: Metadata file
> 'c:\winnt\microsoft.net\framework\v1.1.4322\tempor ary asp.net
> files\spsweb\0e3514bf\cb1844e7\assembly\dl2\3b163f
> 16\00452d31_84e5c301\infragistics.webui.ultrawebgr id.v3.dll' could not be
> found
>
> I could get around it with either restarting vs.net or force a rebuild of
> the entire solution.
> I know that the file in the error is a third party control and have
already
> contacted the creators about it. But i think this is only a sympton of a
> bigger problem.
> I found a new strange problem today: i created a listbox and a button
> (standard asp.net controls) on the form but there events do not fire
> properly. The selectedindex change event on the listbox goes through the
> page_load (as normal) but doesn't go through the code in the event itself
> and the click event ont the button doesn't do anything (put breakpoint
> everywhere no code is executed). Both have autopostback, enabled viewstate
> and all other properties set right.
> It seems that i can do all the normal things in code that already existed
> before the strange compile error started but any new code behind new
events
> is simply ignored.
> Can anyone shed any light on these wierd problems ?
> Kris Vanherk
> Ferranti Computer Systems
I have come across some post linking the last batch of updates to weirds
behaviors,
I have changed nothing on my system outsite them and now the IIS or the
ASP.NET framework is behaving different,
I was debugging an application and used Response.Redirect() to a page that
was not existent, before it would give me an error in the browser ( not
found resource or something like that) , now I get a messagebox on the IDE
saying that a "A first chance exception of type
'System.IO.FileNotFoundException' occurred in system.web.dll" , next another
popup appear reading : "There is no source code available for the current
location." and gives me the opportunity to show the dissassembled coded

Any one knows something about this?

Cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

Strange compiler behavior after CS0006 error

yesterday i started getting this strange error when i try to run my asp.net
project:
Compiler Error Message: CS0006: Metadata file
'c:\winnt\microsoft.net\framework\v1.1.4322\temporary asp.net
files\spsweb\0e3514bf\cb1844e7\assembly\
dl2\3b163f
16\00452d31_84e5c301\infragistics.webui.ultrawebgrid.v3.dll' could not be
found
I could get around it with either restarting vs.net or force a rebuild of
the entire solution.
I know that the file in the error is a third party control and have already
contacted the creators about it. But i think this is only a sympton of a
bigger problem.
I found a new strange problem today: i created a listbox and a button
(standard asp.net controls) on the form but there events do not fire
properly. The selectedindex change event on the listbox goes through the
page_load (as normal) but doesn't go through the code in the event itself
and the click event ont the button doesn't do anything (put breakpoint
everywhere no code is executed). Both have autopostback, enabled viewstate
and all other properties set right.
It seems that i can do all the normal things in code that already existed
before the strange compile error started but any new code behind new events
is simply ignored.
Can anyone shed any light on these wierd problems ?
Kris Vanherk
Ferranti Computer SystemsHi,
I'm having similar problems, for the last couple of days I have problems
each time I debug a ASP.NET application, it says that cannot access a temp
dll it creates in C:\WINNT\Microsoft.NET\Framework\v1.1.4322\Temporary
ASP.NET Files\web_application_name
I have to restart the service to keep it running again.
I'm trying still to figure out what is going on.
Cheers,
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
"Kris Vanherck" <KVanHe@.ferranti.be> wrote in message
news:%23BsTeb5JEHA.3412@.TK2MSFTNGP09.phx.gbl...
> yesterday i started getting this strange error when i try to run my
asp.net
> project:
> Compiler Error Message: CS0006: Metadata file
> 'c:\winnt\microsoft.net\framework\v1.1.4322\temporary asp.net
> files\spsweb\0e3514bf\cb1844e7\assembly\
dl2\3b163f
> 16\00452d31_84e5c301\infragistics.webui.ultrawebgrid.v3.dll' could not be
> found
>
> I could get around it with either restarting vs.net or force a rebuild of
> the entire solution.
> I know that the file in the error is a third party control and have
already
> contacted the creators about it. But i think this is only a sympton of a
> bigger problem.
> I found a new strange problem today: i created a listbox and a button
> (standard asp.net controls) on the form but there events do not fire
> properly. The selectedindex change event on the listbox goes through the
> page_load (as normal) but doesn't go through the code in the event itself
> and the click event ont the button doesn't do anything (put breakpoint
> everywhere no code is executed). Both have autopostback, enabled viewstate
> and all other properties set right.
> It seems that i can do all the normal things in code that already existed
> before the strange compile error started but any new code behind new
events
> is simply ignored.
> Can anyone shed any light on these wierd problems ?
> Kris Vanherk
> Ferranti Computer Systems
>

Saturday, March 24, 2012

Strange Error when executing a function

in my code-behind i call a class method that returns a string value...
i run step by step and works great!!

but when i run without breakpoint... sometimes i get error because my string is empty...
and then i run again step by step... and the surprise! works fine again...

why is this happening??

this is my code-behind

string param = " ";

param +=ConfigurarLoja.RetParams( );

Session.Add("ssnHabItemVincPromo",param);

if(param == " ")

{

response.redirect("~/Erro.aspx");

}

And this is my class method:

publicstaticstring RetParams()

{

string param ="";

int cd_empresa =Convert.ToInt32(HttpContext.Current.Session["ssnCdEmpresa"]);

string sql ="SELECT TOP 1 * FROM LjConfig WHERE cd_empresa = " + cd_empresa +" AND ISNULL(DATEADD(dd, 01, dt_exclusao), GETDATE()) > GETDATE() ORDER BY dt_inclusao DESC";SqlConnection con =newSqlConnection(ConfigurationManager.ConnectionStrings["StringDeConexao"].ConnectionString);

con.Open();

SqlCommand cmd =newSqlCommand(sql, con);

SqlDataReader dr = cmd.ExecuteReader();

dr.Read();

if (dr.HasRows)

{

param ="-" + dr["cd_empresa"].ToString().Trim();

}

con.Close();

return param;

}

ops... it seems solved...
i change the sql command 'WHERE'... i think it was a problem with the GETDATE... now its working fine...

AND (ISNULL(DATEADD(dd, 01, dt_exclusao), DATEADD(dd, 01, GETDATE())) > GETDATE()) "

Thursday, March 22, 2012

strange globalization error

Hi People...

heres hoping someone has run into this scenario before;

I am trying to write a calendar maintenance page, as part of a larger web based app,

The problem: An exception is being raised in a globalization module;

thats not too strange, however the error only fires when there is a post-back from a link button !?

The error details are below..if that helps at all

thanks in advance..

Charli0

<ERROR TRACE
Exception Details:

System.ArgumentOutOfRangeException: Offset and length must refer to a position in the string. Parameter name: string1

Stack Trace:

[ArgumentOutOfRangeException: Offset and length must refer to a position in the string.
Parameter name: string1]
System.Globalization.CompareInfo.CompareRegion(Void* pSortingTable, Int32 win32LCID, String string1, Int32 offset1, Int32 length1, String string2, Int32 offset2, Int32 length2, CompareOptions options) +0
System.Globalization.CompareInfo.Compare(String string1, Int32 offset1, Int32 length1, String string2, Int32 offset2, Int32 length2, CompareOptions options) +54
System.String.Compare(String strA, Int32 indexA, String strB, Int32 indexB, Int32 length, Boolean ignoreCase, CultureInfo culture) +130
System.Web.UI.WebControls.Calendar.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
System.Web.UI.Page.ProcessRequestMain()

</ERROR TRACECould do with a code sample.

Is thething you're comparing loosing it's value on postback?

Strange IIS connection error

Hi all
While developing a web app in visual interdev.net 2003
i get this error when i try to run the app:

There are too many people accessing the Web site at this time.

-----------------------

Please try the following:

a.. Click the Refresh button, or try again later.

b.. Open the localhost home page, and then look for links to the
information you want.
HTTP 403.9 - Access Forbidden: Too many users are connected
Internet Information Services

The problem is intermitent. I'm using IIS 5.1 and ASP 1.1

What can cause this? It's never happened to me before in the last 3 years

Thanks in advance

JohnWhat can cause this? It's never happened to me before in the last 3 years

It is caused by too many users being connected to Internet Information
Services.

--
HTH,

Kevin Spencer
Microsoft MVP
Chicken Salad Surgery

What You Seek Is What You Get.

"John Haycock" <jhayc@dotnet.itags.org.blueyonder.co.ukwrote in message
news:h_cOg.42635$89.33698@dotnet.itags.org.fe1.news.blueyonder.co.u k...

Quote:

Originally Posted by

Hi all
While developing a web app in visual interdev.net 2003
i get this error when i try to run the app:
>
There are too many people accessing the Web site at this time.
>
-----------------------
>
Please try the following:
>
a.. Click the Refresh button, or try again later.
>
b.. Open the localhost home page, and then look for links to the
information you want.
HTTP 403.9 - Access Forbidden: Too many users are connected
Internet Information Services
>
The problem is intermitent. I'm using IIS 5.1 and ASP 1.1
>
What can cause this? It's never happened to me before in the last 3 years
>
Thanks in advance
>
John
>
>


"Kevin Spencer" <uce@dotnet.itags.org.ftc.govwrote in message
news:%23GqxNrA2GHA.3464@dotnet.itags.org.TK2MSFTNGP03.phx.gbl...

Quote:

Originally Posted by

It is caused by too many users being connected to Internet Information
Services.


Hi Kevin

That's the thing its on my development machine at home. Theres noone
connected to it but me?
One user can generate several connections.

Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en espaol : http://asp.net.do/foros/
===================================
"John Haycock" <jhayc@dotnet.itags.org.blueyonder.co.ukwrote in message
news:WYdOg.43278$89.6405@dotnet.itags.org.fe1.news.blueyonder.co.uk ...

Quote:

Originally Posted by

>
"Kevin Spencer" <uce@dotnet.itags.org.ftc.govwrote in message news:%23GqxNrA2GHA.3464@dotnet.itags.org.TK2MSFTNGP03.phx.gbl...

Quote:

Originally Posted by

>It is caused by too many users being connected to Internet Information Services.


>
Hi Kevin
>
That's the thing its on my development machine at home. Theres noone connected to it but me?
>
>


"Juan T. Llibre" <nomailreplies@dotnet.itags.org.nowhere.comwrote in message
news:uYziF3A2GHA.1288@dotnet.itags.org.TK2MSFTNGP03.phx.gbl...

Quote:

Originally Posted by

One user can generate several connections.


Yes but I don't see how by just running a web app. I always close
connections in the code and it's the first time it's happened in over 3
years. it's just a basic site with some web forms and fckeditor embedded in
some of the pages
re:

Quote:

Originally Posted by

I always close connections in the code


The problem is not data access connections. You're not running out of those.
It's http connections.

Windows XP is limited to 10 connections...of all types, both incoming and outgoing.

Run this little test and you'll probably be surprised
at the number of connections you actually have open :

Open a command window ( Start, Run, cmd ) and issue the command :

netstat -a

Make sure you're sitting down when you do that.
I'll bet you didn't know you had so many active connections open.

Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en espaol : http://asp.net.do/foros/
===================================
"John Haycock" <jhayc@dotnet.itags.org.blueyonder.co.ukwrote in message
news:qceOg.43433$89.34469@dotnet.itags.org.fe1.news.blueyonder.co.u k...

Quote:

Originally Posted by

>
"Juan T. Llibre" <nomailreplies@dotnet.itags.org.nowhere.comwrote in message
news:uYziF3A2GHA.1288@dotnet.itags.org.TK2MSFTNGP03.phx.gbl...

Quote:

Originally Posted by

>One user can generate several connections.


Quote:

Originally Posted by

Yes but I don't see how by just running a web app. I always close connections in the code and it's
the first time it's happened in over 3 years. it's just a basic site with some web forms and
fckeditor embedded in some of the pages


"Juan T. Llibre" <nomailreplies@dotnet.itags.org.nowhere.comwrote in message
news:%23kK7LjB2GHA.3476@dotnet.itags.org.TK2MSFTNGP04.phx.gbl...

Quote:

Originally Posted by

re:

Quote:

Originally Posted by

>I always close connections in the code


>
The problem is not data access connections. You're not running out of
those.
It's http connections.
>
Windows XP is limited to 10 connections...of all types, both incoming and
outgoing.
>
Run this little test and you'll probably be surprised
at the number of connections you actually have open :
>
Open a command window ( Start, Run, cmd ) and issue the command :
>
netstat -a
>
Make sure you're sitting down when you do that.
I'll bet you didn't know you had so many active connections open.


Hey Juan you are right that is a shock. But why has localhost got so many
connections open with lots of different ports? Am I being hacked or what? As
I say this is the first time in three years I've got that error so I'm
assuming I have more connections now for some reason
re:

Quote:

Originally Posted by

Hey Juan you are right that is a shock.


heh, heh... I knew it'd be a surprise. :-)

re:

Quote:

Originally Posted by

Am I being hacked or what?


Nope. That's just the way things work.

re:

Quote:

Originally Posted by

But why has localhost got so many connections open with lots of different ports?


Your server ( IIS 5.1 ) is listening on several ports and your active connections
( browser requests from IIS ) stay alive for the default time-to-live configured for Windows XP.

You shouldn't mess with the default time-to-live, but you can tweak
Windows XP so you can have more connections ( although you aren't supposed to ).

See :
http://www.theeldergeek.com/increas...connections.htm
and
http://www.helpwithwindows.com/WindowsXP/tune-120.html
They have the same instructions...

Note : Doing what those sites recommend implies editing the Windows Registry.

What I am telling you is not a recommendation to go ahead and hack
the Windows Registry and, if you do it, you do it at your own risk.

At the very least, backup your registry so you can restore it later in case of an "accident".
After those required disclaimers, feel free to proceed at your own risk.

:-)

Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en espaol : http://asp.net.do/foros/
===================================
"John Haycock" <jhayc@dotnet.itags.org.blueyonder.co.ukwrote in message
news:cZfOg.44739$89.34883@dotnet.itags.org.fe1.news.blueyonder.co.u k...

Quote:

Originally Posted by

>
"Juan T. Llibre" <nomailreplies@dotnet.itags.org.nowhere.comwrote in message
news:%23kK7LjB2GHA.3476@dotnet.itags.org.TK2MSFTNGP04.phx.gbl...

Quote:

Originally Posted by

>re:

Quote:

Originally Posted by

>>I always close connections in the code


>>
>The problem is not data access connections. You're not running out of those.
>It's http connections.
>>
>Windows XP is limited to 10 connections...of all types, both incoming and outgoing.
>>
>Run this little test and you'll probably be surprised
>at the number of connections you actually have open :
>>
>Open a command window ( Start, Run, cmd ) and issue the command :
>>
>netstat -a
>>
>Make sure you're sitting down when you do that.
>I'll bet you didn't know you had so many active connections open.


>
Hey Juan you are right that is a shock. But why has localhost got so many connections open with
lots of different ports? Am I being hacked or what? As I say this is the first time in three years
I've got that error so I'm assuming I have more connections now for some reason
>
>


Thanks for the help Juan. If it keeps happening as reguarly as it is doing
lately I might just give it a tweak :)

"Juan T. Llibre" <nomailreplies@dotnet.itags.org.nowhere.comwrote in message
news:eDEqZbC2GHA.868@dotnet.itags.org.TK2MSFTNGP03.phx.gbl...

Quote:

Originally Posted by

re:

Quote:

Originally Posted by

>Hey Juan you are right that is a shock.


>
heh, heh... I knew it'd be a surprise. :-)
>
re:

Quote:

Originally Posted by

>Am I being hacked or what?


>
Nope. That's just the way things work.
>
re:

Quote:

Originally Posted by

>But why has localhost got so many connections open with lots of different
>ports?


>
Your server ( IIS 5.1 ) is listening on several ports and your active
connections
( browser requests from IIS ) stay alive for the default time-to-live
configured for Windows XP.
>
You shouldn't mess with the default time-to-live, but you can tweak
Windows XP so you can have more connections ( although you aren't supposed
to ).
>
See :
http://www.theeldergeek.com/increas...connections.htm
and
http://www.helpwithwindows.com/WindowsXP/tune-120.html
>
They have the same instructions...
>
Note : Doing what those sites recommend implies editing the Windows
Registry.
>
What I am telling you is not a recommendation to go ahead and hack
the Windows Registry and, if you do it, you do it at your own risk.
>
At the very least, backup your registry so you can restore it later in
case of an "accident".
After those required disclaimers, feel free to proceed at your own risk.
>
:-)
>
>
>
>
Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en espaol : http://asp.net.do/foros/
===================================
"John Haycock" <jhayc@dotnet.itags.org.blueyonder.co.ukwrote in message
news:cZfOg.44739$89.34883@dotnet.itags.org.fe1.news.blueyonder.co.u k...

Quote:

Originally Posted by

>>
>"Juan T. Llibre" <nomailreplies@dotnet.itags.org.nowhere.comwrote in message
>news:%23kK7LjB2GHA.3476@dotnet.itags.org.TK2MSFTNGP04.phx.gbl...

Quote:

Originally Posted by

>>re:
>>>I always close connections in the code
>>>
>>The problem is not data access connections. You're not running out of
>>those.
>>It's http connections.
>>>
>>Windows XP is limited to 10 connections...of all types, both incoming
>>and outgoing.
>>>
>>Run this little test and you'll probably be surprised
>>at the number of connections you actually have open :
>>>
>>Open a command window ( Start, Run, cmd ) and issue the command :
>>>
>>netstat -a
>>>
>>Make sure you're sitting down when you do that.
>>I'll bet you didn't know you had so many active connections open.


>>
>Hey Juan you are right that is a shock. But why has localhost got so many
>connections open with lots of different ports? Am I being hacked or what?
>As I say this is the first time in three years I've got that error so I'm
>assuming I have more connections now for some reason
>>
>>


>
>
>

Tuesday, March 13, 2012

Strange problem

I have an ASP.Net web application that runs fine on my local server but when I try to run it over the web I get the message:

Runtime Error
Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.

Details: To enable the details of this specific error message to be viewable on remote machines, please create a <customErrors> tag within a "web.config" configuration file located in the root directory of the current web application. This <customErrors> tag should then have its "mode" attribute set to "Off".

<!-- Web.Config Configuration File --
<configuration>
<system.web>
<customErrors mode="Off"/>
</system.web>
</configuration
I have custom errors turned to Off...

Any suggestions?I think I know what it is:

Try going into teh problem server's IIS and find the application directory.
Then click properties on the directory.
When a dialog appears, click the 'Create' button next to trhe Application settings to create the application dir in IIS.

That should fix it.
Are you talking about Application settings in the Home Directory Tab of the properties?

If so then an application it is already set at the default application. I tried removing it and creating it again but no go.
I am talking about the directory where your code is.

Should be the directory where your 'bin' directory is.

That directory needs to be set as the application directory by doing the above steps I mentioned. This might no be the problem but the symptoms are similar to a problem I recently had and it was caused by me not doing those steps on the live server when I copied my files over.
I will try to explain it more clearly:

1) Open IIS
2) Find your application directory within IIS (usually somewhere in 'Default Web Site').
3) Once you have found the directory (it should have a bin directory in it), right click on it and a select properties.
4) A window should appear with a title of: 'you directory name' Properties
5) There should be a punch of tabbed pages. The first one having the title of 'Directory'.
6) Click the 'Create' button to create the Application name.
7) Click apply.

BTW these steps are based on IIS 6.0

This might not be the problem but to me it sounds like it is. Let me know how it turns out.
Not sure if this is the same thing but this is what I did:

1. Open IIS
2. Find my website that I have created
3. Right Clicked on it and selected properties
4. It has a bunch of tabs including Home Directory, WebSite, Directory Security etc
5. I go to Home Directory and click Create At the Application Settings.
6 The Application name is then created and I hit apply.
7. This I have tried a number of times but still get the same error message.
Well if that didn't fix I am not sure what else to suggest.

Do you have access to the server? If so use the local browser on it to test and see if it gives you an error message. It must be a configuration problem or something you missed when copying over the needed files since it works fine on your dev pc.