Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Facebook Sign In with Google Sign In with OpenID

Categories

We have migrated to a new platform! Please note that you will need to reset your password to log in (your credentials are still in-tact though). Please contact lee@programmersheaven.com if you have questions.
Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

what's up with ASP.NET??????

donkyhodonkyho Posts: 99Member
I am writing an ASP.NET app in C#. I am having some serious problems with things. I don't understand why, but sometimes things work and a day or 2 later it doesn't work anymore! For example, I have a COM object I wrote in C++ that I am using in the app. The object creation line of code will sometimes cause my app to crash and sometimes it works just fine. I sent a message to a friend who suggested my ASP.NET user account on my computer doesn't have access to the folders it needs, so I gave more access to that user and it fixed that problem. For some reason though I will be working on it, test it and it will crash trying to create the object again. I am POSITIVE it's not any code. I don't understand how to set up my computer properly for ASP.NET. What permissions must I set, etc. One thing I have noticed is that under internet options...in the LAN Settings, if "automatically detect network settings" is checked, my code does not work. Right now I can not create an object from my dll, but as has happened a few times this week, I'll look around change a few settings, then change them back to exactly how they are now, reboot and bam, for some reason it'll work :). Anyways, I know I rambled on here, and I hope my jibberish made sense, but I would really like to know if someone can tell me how to configure my settings so I don't continue to have these problems, or if I do, at least I understand them.

Thanks

Comments

  • raymcdraymcd Posts: 284Member
    : I am writing an ASP.NET app in C#. I am having some serious problems with things. I don't understand why, but sometimes things work and a day or 2 later it doesn't work anymore! For example, I have a COM object I wrote in C++ that I am using in the app. The object creation line of code will sometimes cause my app to crash and sometimes it works just fine. I sent a message to a friend who suggested my ASP.NET user account on my computer doesn't have access to the folders it needs, so I gave more access to that user and it fixed that problem. For some reason though I will be working on it, test it and it will crash trying to create the object again. I am POSITIVE it's not any code. I don't understand how to set up my computer properly for ASP.NET. What permissions must I set, etc. One thing I have noticed is that under internet options...in the LAN Settings, if "automatically detect network settings" is checked, my code does not work. Right now I can not create an object from my dll, but as has happened a few times this week, I'll look around change a few settings, then change them back to exactly how they are now, reboot and bam, for some reason it'll work :). Anyways, I know I rambled on here, and I hope my jibberish made sense, but I would really like to know if someone can tell me how to configure my settings so I don't continue to have these problems, or if I do, at least I understand them.
    :
    : Thanks

    Set AspCompat to true. That should fix it. It has to do with single threaded apartments and stuff like that (that's the technical explanation by the way) :) I don't know enough about the object and its thread safety/behavior/requirements but its worth trying. If you have some flakey creation error with an unmanaged component this is the first thing I'd try. Sounds like a threading issue.

    -ray
  • donkyhodonkyho Posts: 99Member
    : : I am writing an ASP.NET app in C#. I am having some serious problems with things. I don't understand why, but sometimes things work and a day or 2 later it doesn't work anymore! For example, I have a COM object I wrote in C++ that I am using in the app. The object creation line of code will sometimes cause my app to crash and sometimes it works just fine. I sent a message to a friend who suggested my ASP.NET user account on my computer doesn't have access to the folders it needs, so I gave more access to that user and it fixed that problem. For some reason though I will be working on it, test it and it will crash trying to create the object again. I am POSITIVE it's not any code. I don't understand how to set up my computer properly for ASP.NET. What permissions must I set, etc. One thing I have noticed is that under internet options...in the LAN Settings, if "automatically detect network settings" is checked, my code does not work. Right now I can not create an object from my dll, but as has happened a few times this week, I'll look around change a few settings, then change them back to exactly how they are now, reboot and bam, for some reason it'll work :). Anyways, I know I rambled on here, and I hope my jibberish made sense, but I would really like to know if someone can tell me how to configure my settings so I don't continue to have these problems, or if I do, at least I understand them.
    : :
    : : Thanks
    :
    : Set AspCompat to true. That should fix it. It has to do with single threaded apartments and stuff like that (that's the technical explanation by the way) :) I don't know enough about the object and its thread safety/behavior/requirements but its worth trying. If you have some flakey creation error with an unmanaged component this is the first thing I'd try. Sounds like a threading issue.
    :
    : -ray
    :

    sorry for my ignorance, but how and where do I set this AspCompat to true? I've never heard of AspCompat
  • raymcdraymcd Posts: 284Member
    : : : I am writing an ASP.NET app in C#. I am having some serious problems with things. I don't understand why, but sometimes things work and a day or 2 later it doesn't work anymore! For example, I have a COM object I wrote in C++ that I am using in the app. The object creation line of code will sometimes cause my app to crash and sometimes it works just fine. I sent a message to a friend who suggested my ASP.NET user account on my computer doesn't have access to the folders it needs, so I gave more access to that user and it fixed that problem. For some reason though I will be working on it, test it and it will crash trying to create the object again. I am POSITIVE it's not any code. I don't understand how to set up my computer properly for ASP.NET. What permissions must I set, etc. One thing I have noticed is that under internet options...in the LAN Settings, if "automatically detect network settings" is checked, my code does not work. Right now I can not create an object from my dll, but as has happened a few times this week, I'll look around change a few settings, then change them back to exactly how they are now, reboot and bam, for some reason it'll work :). Anyways, I know I rambled on here, and I hope my jibberish made sense, but I would really like to know if someone can tell me how to configure my settings so I don't continue to have these problems, or if I do, at least I understand them.
    : : :
    : : : Thanks
    : :
    : : Set AspCompat to true. That should fix it. It has to do with single threaded apartments and stuff like that (that's the technical explanation by the way) :) I don't know enough about the object and its thread safety/behavior/requirements but its worth trying. If you have some flakey creation error with an unmanaged component this is the first thing I'd try. Sounds like a threading issue.
    : :
    : : -ray
    : :
    :
    : sorry for my ignorance, but how and where do I set this AspCompat to true? I've never heard of AspCompat
    :

    DUDE... at least look it up in the help. It has its own index entry. You add it to the Page directive at the top of the html source for your webform.

    <@ Page AspCompat="true"> 'Don't change the stuff that's already there.

    -Ray
Sign In or Register to comment.