Solved

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

Posted on 2009-07-12
3
1,866 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

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

746 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now