Solved

ASP.NET BAD IL Range when adding files to bin directory or modifying web.config

Posted on 2009-07-12
3
1,904 Views
Last Modified: 2012-05-07
Hi Experts.

In my product there are some actions where I modify the web.config file or add a file (e.g. license file) to the bin directory, or perform some other actions to cause the site to reset (like updating the date modified on web.config) thru the ASP.net application itself.

SOMETIMES after these actions the site displays an error BAD IL RANGE and requires me to do an IISRESET to get it to come back.

Any idea how this can be avoided?

This is an ASP.net 3.5 SP1 site.
0
Comment
Question by:mooka
  • 2
3 Comments
 
LVL 14

Assisted Solution

by:wolfman007
wolfman007 earned 100 total points
ID: 24893902
How did you create the bin folder in your ASP.NET site?

Did you create it manually or use the following?

In solution explorer right click on the website name
select "Add Asp.net Folders" followed by "Bin" will add the Bin folder.

Also check out the following website

http://blogs.msdn.com/tom/archive/2008/07/21/asp-net-tips-loading-a-dll-out-of-the-bin-directory.aspx

If you are in ASP.NET, most likely the cause is that you dont have the following entry in the machine.config prior to 2.0 and the root web.config file (in the same folder as machine.config) for 2.0 and later.
<compilation>
  <assemblies>
    <add assembly="*"/>
  </assemblies>
</compilation>

Open in new window

0
 

Accepted Solution

by:
mooka earned 0 total points
ID: 25256801
I added a thread sleep and that resolved the issue.
0
 

Author Comment

by:mooka
ID: 25256807
Found workaround
0

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

821 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question