Showing posts with label available. Show all posts
Showing posts with label available. Show all posts

Monday, March 26, 2012

System.Net is not available in VS2005 Web project

I'm trying to access the System.Net.Mail namespace in an ASP.NET application (not website) and it's not available. Any ideas why not?

It is available in a different web site project, but not in an application.

Thanks,

Kahanu

make sure that a reference to System.dll assembly is exists in your application.

Thursday, March 22, 2012

System.ObjectDisposedException - REALLY NEED HELP !

Hi !

My website breakdown at least 20 times per day with a
System.ObjectDisposedException.

The only information available are those given by the httpmodule treating
the unhandledexception causing breakdown. Here are these information :

Type de l'vnement : Erreur
Source de l'vnement : ASP.NET 2.0.50727.0
Catgorie de l'vnement : Aucun
ID de l'vnement : 0
Date : 4/12/2007
Heure : 13:36:00
Utilisateur : N/A
Ordinateur : T04
Description :
La description pour l'ID d'vnement ( 0 ) dans la source (ASP.NET
2.0.50727.0) est introuvable. L'ordinateur local n'a peut-tre pas les
informations de Registre ou les librairies requises pour afficher les
messages manant d'un ordinateur distant. Vous pourrez peut-tre utiliser
l'option /AUXSOURCE= pour rcuprer cette description. Reportez-vous aux
rubriques Aide et support pour plus de dtails. Les informations suivantes
font partie de l'vnement :

UnhandledException logged by UnhandledExceptionModule.dll:

appId=/LM/W3SVC/1984782886/Root

type=System.ObjectDisposedException

message=Le handle scuris a t ferm

stack=
System.Net.UnsafeNclNativeMethods.OSSOCK.shutdown( SafeCloseSocket
socketHandle, Int32 how)
System.Net.Sockets.Socket.Shutdown(SocketShutdown how)
?.Finalize()

There is no trace from my webapplication in the stacktrace. So it's
impossible for me to find where is located the problem in my webapplication.

Ant idea to locate the origin of the problem would be great !

--
Bernard
bernard.borsu@dotnet.itags.org.odysseos.netdeploy a debug build, and you will get a stack trace.

-- bruce (sqlwork.com)

"Bernard Borsu" wrote:

Quote:

Originally Posted by

Hi !
>
My website breakdown at least 20 times per day with a
System.ObjectDisposedException.
>
The only information available are those given by the httpmodule treating
the unhandledexception causing breakdown. Here are these information :
>
Type de l'événement : Erreur
Source de l'événement : ASP.NET 2.0.50727.0
Catégorie de l'événement : Aucun
ID de l'événement : 0
Date : 4/12/2007
Heure : 13:36:00
Utilisateur : N/A
Ordinateur : T04
Description :
La description pour l'ID d'événement ( 0 ) dans la source (ASP.NET
2.0.50727.0) est introuvable. L'ordinateur local n'a peut-être pas les
informations de Registre ou les librairies requises pour afficher les
messages émanant d'un ordinateur distant. Vous pourrez peut-être utiliser
l'option /AUXSOURCE= pour récupérer cette description. Reportez-vous aux
rubriques Aide et support pour plus de détails. Les informations suivantes
font partie de l'événement :
>
UnhandledException logged by UnhandledExceptionModule.dll:
>
appId=/LM/W3SVC/1984782886/Root
>
type=System.ObjectDisposedException
>
message=Le handle sécurisé a été fermé
>
stack=
* System.Net.UnsafeNclNativeMethods.OSSOCK.shutdown( SafeCloseSocket
socketHandle, Int32 how)
* System.Net.Sockets.Socket.Shutdown(SocketShutdown how)
* ?.Finalize()
>
There is no trace from my webapplication in the stacktrace. So it's
impossible for me to find where is located the problem in my webapplication.
>
Ant idea to locate the origin of the problem would be great !
>
--
Bernard
bernard.borsu@.odysseos.net
>
>
>


Hi !

I've think i've already deployed a debug version. In VS2005, i've selected
debug in the configuration manager before generating my web application. All
pdb files are present on the bin directory of the website.

Did i missed something in generating a debug version ?

"bruce barker (sqlwork.com)"
<brucebarkersqlworkcom@.discussions.microsoft.coma crit dans le message de
news: F0AA7A5E-A8B9-49F3-8678-93E20B758429@.microsoft.com...

Quote:

Originally Posted by

deploy a debug build, and you will get a stack trace.
>
-- bruce (sqlwork.com)
>
>
"Bernard Borsu" wrote:
>

Quote:

Originally Posted by

>Hi !
>>
>My website breakdown at least 20 times per day with a
>System.ObjectDisposedException.
>>
>The only information available are those given by the httpmodule treating
>the unhandledexception causing breakdown. Here are these information :
>>
>Type de l'vnement : Erreur
>Source de l'vnement : ASP.NET 2.0.50727.0
>Catgorie de l'vnement : Aucun
>ID de l'vnement : 0
>Date : 4/12/2007
>Heure : 13:36:00
>Utilisateur : N/A
>Ordinateur : T04
>Description :
>La description pour l'ID d'vnement ( 0 ) dans la source (ASP.NET
>2.0.50727.0) est introuvable. L'ordinateur local n'a peut-tre pas les
>informations de Registre ou les librairies requises pour afficher les
>messages manant d'un ordinateur distant. Vous pourrez peut-tre utiliser
>l'option /AUXSOURCE= pour rcuprer cette description. Reportez-vous aux
>rubriques Aide et support pour plus de dtails. Les informations
>suivantes
>font partie de l'vnement :
>>
>UnhandledException logged by UnhandledExceptionModule.dll:
>>
>appId=/LM/W3SVC/1984782886/Root
>>
>type=System.ObjectDisposedException
>>
>message=Le handle scuris a t ferm
>>
>stack=
> System.Net.UnsafeNclNativeMethods.OSSOCK.shutdown( SafeCloseSocket
>socketHandle, Int32 how)
> System.Net.Sockets.Socket.Shutdown(SocketShutdown how)
> ?.Finalize()
>>
>There is no trace from my webapplication in the stacktrace. So it's
>impossible for me to find where is located the problem in my
>webapplication.
>>
>Ant idea to locate the origin of the problem would be great !
>>
>--
>Bernard
>bernard.borsu@.odysseos.net
>>
>>
>>

System.ObjectDisposedException - REALLY NEED HELP !

Hi !
My website breakdown at least 20 times per day with a
System.ObjectDisposedException.
The only information available are those given by the httpmodule treating
the unhandledexception causing breakdown. Here are these information :
Type de l'vnement : Erreur
Source de l'vnement : ASP.NET 2.0.50727.0
Catgorie de l'vnement : Aucun
ID de l'vnement : 0
Date : 4/12/2007
Heure : 13:36:00
Utilisateur : N/A
Ordinateur : T04
Description :
La description pour l'ID d'vnement ( 0 ) dans la source (ASP.NET
2.0.50727.0) est introuvable. L'ordinateur local n'a peut-tre pas les
informations de Registre ou les librairies requises pour afficher les
messages manant d'un ordinateur distant. Vous pourrez peut-tre utiliser
l'option /AUXSOURCE= pour rcuprer cette description. Reportez-vous aux
rubriques Aide et support pour plus de dtails. Les informations suivantes
font partie de l'vnement :
UnhandledException logged by UnhandledExceptionModule.dll:
appId=/LM/W3SVC/1984782886/Root
type=System.ObjectDisposedException
message=Le handle scuris a t ferm
stack=
System.Net.UnsafeNclNativeMethods.OSSOCK.shutdown(SafeCloseSocket
socketHandle, Int32 how)
System.Net.Sockets.Socket.Shutdown(SocketShutdown how)
?.Finalize()
There is no trace from my webapplication in the stacktrace. So it's
impossible for me to find where is located the problem in my webapplication.
Ant idea to locate the origin of the problem would be great !
Bernard
bernard.borsu@dotnet.itags.org.odysseos.netdeploy a debug build, and you will get a stack trace.
-- bruce (sqlwork.com)
"Bernard Borsu" wrote:

> Hi !
> My website breakdown at least 20 times per day with a
> System.ObjectDisposedException.
> The only information available are those given by the httpmodule treating
> the unhandledexception causing breakdown. Here are these information :
> Type de l'événement : Erreur
> Source de l'événement : ASP.NET 2.0.50727.0
> Catégorie de l'événement : Aucun
> ID de l'événement : 0
> Date : 4/12/2007
> Heure : 13:36:00
> Utilisateur : N/A
> Ordinateur : T04
> Description :
> La description pour l'ID d'événement ( 0 ) dans la source (ASP.NET
> 2.0.50727.0) est introuvable. L'ordinateur local n'a peut-être pas les
> informations de Registre ou les librairies requises pour afficher les
> messages émanant d'un ordinateur distant. Vous pourrez peut-être utilise
r
> l'option /AUXSOURCE= pour récupérer cette description. Reportez-vous aux
> rubriques Aide et support pour plus de détails. Les informations suivante
s
> font partie de l'événement :
> UnhandledException logged by UnhandledExceptionModule.dll:
> appId=/LM/W3SVC/1984782886/Root
> type=System.ObjectDisposedException
> message=Le handle sécurisé a été fermé
> stack=
> _ System.Net.UnsafeNclNativeMethods.OSSOCK.shutdown(SafeCloseSocket
> socketHandle, Int32 how)
> _ System.Net.Sockets.Socket.Shutdown(SocketShutdown how)
> _ ?.Finalize()
> There is no trace from my webapplication in the stacktrace. So it's
> impossible for me to find where is located the problem in my webapplicatio
n.
> Ant idea to locate the origin of the problem would be great !
> --
> Bernard
> bernard.borsu@.odysseos.net
>
>
Hi !
I've think i've already deployed a debug version. In VS2005, i've selected
debug in the configuration manager before generating my web application. All
pdb files are present on the bin directory of the website.
Did i missed something in generating a debug version ?
"bruce barker (sqlwork.com)"
<brucebarkersqlworkcom@.discussions.microsoft.com> a crit dans le message de
news: F0AA7A5E-A8B9-49F3-8678-93E20B758429@.microsoft.com...
> deploy a debug build, and you will get a stack trace.
> -- bruce (sqlwork.com)
>
> "Bernard Borsu" wrote:
>

System.OutOfMemoryException

I just got this error on my server even though I have lots of available memory. I did notice that my aspnet_wp.exe was at 648MB. How can I get the bugger back down to a lower MB usage without restarting the asp worker processor?Not sure why you are getting the error when you have available memory, maybe you incorrectly customised the garbage collection?

As far as reducing memory usage, well there could be multiple efficiencies possible in your code, there is no magic bullet :(.

Cheers
Martin
No, I didn't customize the garbage collection. I wouldn't even knwo where to begin on how to do such a thing. I am looking into my code trying to see where I might have efficiency problems. Mainly looking at if I dispose of all my object correctly. If I dispose of my objects in the finally block will that get remove them from memory?

Thanks.
Garbage collection usually manages the clean up of .Net objects. Although it is possible, MS recommends that you do not modify the behavior of the garbage collector so don't let me put bad ideas into your head :).

As far as disposing of objects, you usually only need to woory about that for unmanaged objects (legacy). How large is your code, can you put up a sample?

Cheers
Martin
Are you storing a lot of stuff in cache or session variables?
Rethink your design or let somebody do a code review ...
I would like to do a code review. What is the best way to do this?