Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2009-07-12
3
Medium Priority
?
2,095 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 400 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

NEW Veeam Backup for Microsoft Office 365 1.5

With Office 365, it’s your data and your responsibility to protect it. NEW Veeam Backup for Microsoft Office 365 eliminates the risk of losing access to your Office 365 data.

Question has a verified solution.

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

ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
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…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
Loops Section Overview
Suggested Courses

824 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