Solved

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

Posted on 2009-07-12
3
1,988 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

Question has a verified solution.

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

Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…

617 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