Solved

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

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

Control application downtime with dependency maps

Visualize the interdependencies between application components better with Applications Manager's automated application discovery and dependency mapping feature. Resolve performance issues faster by quickly isolating problematic components.

Question has a verified solution.

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

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…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…

895 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