473,750 Members | 2,520 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Type.GetType Access is denied

Hello,

The .NET application I have just installed at a client web site is throwing
a strange error. At first the applications works without any problems, but
after 10 mins or so Access denied error messages are thrown.

The application, web based, late binds to a series of assemblies, none of
which are in the GAC. I have configured the application to impersonate the
IIS user and have set the user to have access to all relevant directories
(wwwroot, wwwroot/bin, Microsoft.Net/framework/v1.1.4322) and disabled the
index services service.

After digging a little deeper it seems the error is thrown when calling
Type.GetType, but like I mentioned earlier everything works fine but then
suddenly dies.

Can anybody think why this is the case and what I can do to resolve this
irritating problem.
Thanks

Richard.
Nov 16 '05 #1
4 2729
Can you give you full text/call stack of the error message?

Ken
"RichB" <ri**********@h otmail.com> wrote in message
news:O1******** ******@TK2MSFTN GP10.phx.gbl...
Hello,

The .NET application I have just installed at a client web site is throwing a strange error. At first the applications works without any problems, but after 10 mins or so Access denied error messages are thrown.

The application, web based, late binds to a series of assemblies, none of
which are in the GAC. I have configured the application to impersonate the IIS user and have set the user to have access to all relevant directories
(wwwroot, wwwroot/bin, Microsoft.Net/framework/v1.1.4322) and disabled the
index services service.

After digging a little deeper it seems the error is thrown when calling
Type.GetType, but like I mentioned earlier everything works fine but then
suddenly dies.

Can anybody think why this is the case and what I can do to resolve this
irritating problem.
Thanks

Richard.

Nov 16 '05 #2
Ken,

Callstack information as requested. Sorry, but I have had to replace all
sensitive data with <**>.

<ExceptionInfor mation>
<AdditionalInfo rmationProperty ExceptionManage r.MachineName=" <**>"
ExceptionManage r.TimeStamp="8/13/2004 8:36:37 AM"
ExceptionManage r.FullName="Mic rosoft.Applicat ionBlocks.Excep tionManagement,
Version=1.0.165 6.18979, Culture=neutral , PublicKeyToken= 3dcf13b858d6259 b"
ExceptionManage r.AppDomainName ="/LM/w3svc/3/Root-6-127368007456178 050"
ExceptionManage r.ThreadIdentit y="" ExceptionManage r.WindowsIdenti ty="<**>"/>
<Exception ExceptionType=" System.IO.FileL oadException" Message="Access is
denied: '<**>.<**>.Web. Custom'." FileName="<**>. <**>.Web.Custom "
FusionLog="=== Pre-bind state information ===&#xD;&#xA;LO G: DisplayName =
<**>.<**>.Web.C ustom, Version=1.0.0.0 , Culture=neutral ,
PublicKeyToken= 3dcf13b858d6259 b&#xA; (Fully-specified)&#xD; &#xA;LOG: Appbase
= file:///C:/Program Files/<**>/webapps/<**>/Web
Server/wwwroot&#xD;&#x A;LOG: Initial PrivatePath = bin&#xD;&#xA;Ca lling
assembly : (Unknown).&#xD; &#xA;===&#xA;&# xD;&#xA;LOG: Attempting download of
new URL file:///C:/WINNT/Microsoft.NET/Framework/v1.1.4322/Temporary ASP.NET
Files/root/04a27ca2/cc847738/<**>.<**>.Web.C ustom.DLL.&#xD; &#xA;LOG:
Attempting download of new URL
file:///C:/WINNT/Microsoft.NET/Framework/v1.1.4322/Temporary ASP.NET
Files/root/04a27ca2/cc847738/<**>.<**>.Web.C ustom/<**>.<**>.Web.C ustom.DLL.&
#xD;&#xA;LOG: Attempting download of new URL file:///C:/Program
Files/<**>/webapps/<**>/Web
Server/wwwroot/bin/<**>.<**>.Web.C ustom.DLL.&#xD; &#xA;"
TargetSite="Sys tem.Type GetType(System. String, Boolean)" Source="mscorli b">
<StackTrace> at System.Type.Get Type(String typeName, Boolean throwOnError)
at <**>.<**>.Web.T ypes.BORequest. Validate()
at <**>.<**>.Web.C ommon.Helpers.S upportSerializa tion.Deserializ e(Stream
sourceXml, Type typeOfObjectToC reate)
at <**>.<**>.Web.C ommon.Helpers.S upportSerializa tion.Deserializ e(String
sourceXml, Type typeOfObjectToC reate)
at
<**>.<**>.Web.w wwroot.Business .ApplicationCon figuration.GetB ORequest(IMSE_R e
quest sourceImseReque st)
at
<**>.<**>.Web.w wwroot.Business .XmlProvider.Ge nerateContextRe quest(IMSE_Requ e
st sourceImseReque st, Authentication& amp; userAuthenticat ion, BORequest&amp;
boRequestConfig uration)
at <**>.<**>.Web.w wwroot.Business .XmlProvider.Pr ocess(IMSE_Requ est
sourceImseReque st)</StackTrace>
</Exception>
</ExceptionInform ation>

Thanks

Richard.


"Ken Kolda" <ke*******@elli emae-nospamplease.co m> wrote in message
news:eU******** ******@TK2MSFTN GP09.phx.gbl...
Can you give you full text/call stack of the error message?

Ken
"RichB" <ri**********@h otmail.com> wrote in message
news:O1******** ******@TK2MSFTN GP10.phx.gbl...
Hello,

The .NET application I have just installed at a client web site is

throwing
a strange error. At first the applications works without any problems,

but
after 10 mins or so Access denied error messages are thrown.

The application, web based, late binds to a series of assemblies, none of which are in the GAC. I have configured the application to impersonate

the
IIS user and have set the user to have access to all relevant directories (wwwroot, wwwroot/bin, Microsoft.Net/framework/v1.1.4322) and disabled the index services service.

After digging a little deeper it seems the error is thrown when calling
Type.GetType, but like I mentioned earlier everything works fine but then suddenly dies.

Can anybody think why this is the case and what I can do to resolve this
irritating problem.
Thanks

Richard.


Nov 16 '05 #3
As I'm sure you've seen, the problem arises when it's trying to load the
xxx.Web.Custom assembly. The fact it's a FileLoadExcepti on (as opposed to a
TypeLoadExcepti on) to me says its a file system permission issue (as you
clearly suspected). You said you granted the IIS user access to wwwroot,
wwwroot/bin and the .NET Framework folder. I'm not sure if by "access" you
mean read/write or read-only, but you should verify the user has full
permissions for the "Microsoft. NET/Framework/v1.1.4322/Temporary ASP.NET
Files" folder and that these permissions are inherited by the subfolders.

If that doesn't fix it, do a test (if you haven't already) and have the
ASP.NET process run as a more privileged user (e.g. SYSTEM). See if that
fixes it -- at least that will verify it's a user-related permissions issue
(as opposed to some other .NET config issue).

Ken
"RichB" <ri**********@h otmail.com> wrote in message
news:Ow******** ********@TK2MSF TNGP10.phx.gbl. ..
Ken,

Callstack information as requested. Sorry, but I have had to replace all
sensitive data with <**>.

<ExceptionInfor mation>
<AdditionalInfo rmationProperty ExceptionManage r.MachineName=" <**>"
ExceptionManage r.TimeStamp="8/13/2004 8:36:37 AM"
ExceptionManage r.FullName="Mic rosoft.Applicat ionBlocks.Excep tionManagement, Version=1.0.165 6.18979, Culture=neutral , PublicKeyToken= 3dcf13b858d6259 b"
ExceptionManage r.AppDomainName ="/LM/w3svc/3/Root-6-127368007456178 050"
ExceptionManage r.ThreadIdentit y="" ExceptionManage r.WindowsIdenti ty="<**>"/> <Exception ExceptionType=" System.IO.FileL oadException" Message="Access is
denied: '<**>.<**>.Web. Custom'." FileName="<**>. <**>.Web.Custom "
FusionLog="=== Pre-bind state information ===&#xD;&#xA;LO G: DisplayName =
<**>.<**>.Web.C ustom, Version=1.0.0.0 , Culture=neutral ,
PublicKeyToken= 3dcf13b858d6259 b&#xA; (Fully-specified)&#xD; &#xA;LOG: Appbase = file:///C:/Program Files/<**>/webapps/<**>/Web
Server/wwwroot&#xD;&#x A;LOG: Initial PrivatePath = bin&#xD;&#xA;Ca lling
assembly : (Unknown).&#xD; &#xA;===&#xA;&# xD;&#xA;LOG: Attempting download of new URL file:///C:/WINNT/Microsoft.NET/Framework/v1.1.4322/Temporary ASP.NET Files/root/04a27ca2/cc847738/<**>.<**>.Web.C ustom.DLL.&#xD; &#xA;LOG:
Attempting download of new URL
file:///C:/WINNT/Microsoft.NET/Framework/v1.1.4322/Temporary ASP.NET
Files/root/04a27ca2/cc847738/<**>.<**>.Web.C ustom/<**>.<**>.Web.C ustom.DLL.& #xD;&#xA;LOG: Attempting download of new URL file:///C:/Program
Files/<**>/webapps/<**>/Web
Server/wwwroot/bin/<**>.<**>.Web.C ustom.DLL.&#xD; &#xA;"
TargetSite="Sys tem.Type GetType(System. String, Boolean)" Source="mscorli b"> <StackTrace> at System.Type.Get Type(String typeName, Boolean throwOnError)
at <**>.<**>.Web.T ypes.BORequest. Validate()
at <**>.<**>.Web.C ommon.Helpers.S upportSerializa tion.Deserializ e(Stream
sourceXml, Type typeOfObjectToC reate)
at <**>.<**>.Web.C ommon.Helpers.S upportSerializa tion.Deserializ e(String
sourceXml, Type typeOfObjectToC reate)
at
<**>.<**>.Web.w wwroot.Business .ApplicationCon figuration.GetB ORequest(IMSE_R e quest sourceImseReque st)
at
<**>.<**>.Web.w wwroot.Business .XmlProvider.Ge nerateContextRe quest(IMSE_Requ e st sourceImseReque st, Authentication& amp; userAuthenticat ion, BORequest&amp; boRequestConfig uration)
at <**>.<**>.Web.w wwroot.Business .XmlProvider.Pr ocess(IMSE_Requ est
sourceImseReque st)</StackTrace>
</Exception>
</ExceptionInform ation>

Thanks

Richard.


"Ken Kolda" <ke*******@elli emae-nospamplease.co m> wrote in message
news:eU******** ******@TK2MSFTN GP09.phx.gbl...
Can you give you full text/call stack of the error message?

Ken
"RichB" <ri**********@h otmail.com> wrote in message
news:O1******** ******@TK2MSFTN GP10.phx.gbl...
Hello,

The .NET application I have just installed at a client web site is

throwing
a strange error. At first the applications works without any problems,
but
after 10 mins or so Access denied error messages are thrown.

The application, web based, late binds to a series of assemblies, none of which are in the GAC. I have configured the application to
impersonate
the
IIS user and have set the user to have access to all relevant

directories (wwwroot, wwwroot/bin, Microsoft.Net/framework/v1.1.4322) and disabled the index services service.

After digging a little deeper it seems the error is thrown when
calling Type.GetType, but like I mentioned earlier everything works fine but

then suddenly dies.

Can anybody think why this is the case and what I can do to resolve this irritating problem.
Thanks

Richard.



Nov 16 '05 #4
Ken,

Thanks for the information.

Unfortunately, the IIS user has full control to Microsoft.NET directory and
all its children and it still fails. I have also changed the user to an
Admin user and it works, but causes problems because the user has to be
trusted on a SQL database.

At first I thought it could just be an issue with the client installation,
but after playing with a similar install back at the office I seem to get
the same problems when I change the port. At first everything is running as
expected, but then I get the "Access is denied" message.

Thankfully, I have found that by adding everyone to the Microsoft.NET
directory the problem is solved. Fortunately, this client is not so
concerned about security on directories, but I know for sure that certain
other clients will not allow everyone access.

Thanks

Richard.

P.S Once again thanks for the help, it is really appreciated.

"Ken Kolda" <ke*******@elli emae-nospamplease.co m> wrote in message
news:u6******** ******@TK2MSFTN GP12.phx.gbl...
As I'm sure you've seen, the problem arises when it's trying to load the
xxx.Web.Custom assembly. The fact it's a FileLoadExcepti on (as opposed to a TypeLoadExcepti on) to me says its a file system permission issue (as you
clearly suspected). You said you granted the IIS user access to wwwroot,
wwwroot/bin and the .NET Framework folder. I'm not sure if by "access" you
mean read/write or read-only, but you should verify the user has full
permissions for the "Microsoft. NET/Framework/v1.1.4322/Temporary ASP.NET
Files" folder and that these permissions are inherited by the subfolders.

If that doesn't fix it, do a test (if you haven't already) and have the
ASP.NET process run as a more privileged user (e.g. SYSTEM). See if that
fixes it -- at least that will verify it's a user-related permissions issue (as opposed to some other .NET config issue).

Ken
"RichB" <ri**********@h otmail.com> wrote in message
news:Ow******** ********@TK2MSF TNGP10.phx.gbl. ..
Ken,

Callstack information as requested. Sorry, but I have had to replace all
sensitive data with <**>.

<ExceptionInfor mation>
<AdditionalInfo rmationProperty ExceptionManage r.MachineName=" <**>"
ExceptionManage r.TimeStamp="8/13/2004 8:36:37 AM"

ExceptionManage r.FullName="Mic rosoft.Applicat ionBlocks.Excep tionManagement,
Version=1.0.165 6.18979, Culture=neutral , PublicKeyToken= 3dcf13b858d6259 b"
ExceptionManage r.AppDomainName ="/LM/w3svc/3/Root-6-127368007456178 050"
ExceptionManage r.ThreadIdentit y=""

ExceptionManage r.WindowsIdenti ty="<**>"/>
<Exception ExceptionType=" System.IO.FileL oadException" Message="Access is denied: '<**>.<**>.Web. Custom'." FileName="<**>. <**>.Web.Custom "
FusionLog="=== Pre-bind state information ===&#xD;&#xA;LO G: DisplayName = <**>.<**>.Web.C ustom, Version=1.0.0.0 , Culture=neutral ,
PublicKeyToken= 3dcf13b858d6259 b&#xA; (Fully-specified)&#xD; &#xA;LOG:

Appbase
= file:///C:/Program Files/<**>/webapps/<**>/Web
Server/wwwroot&#xD;&#x A;LOG: Initial PrivatePath = bin&#xD;&#xA;Ca lling
assembly : (Unknown).&#xD; &#xA;===&#xA;&# xD;&#xA;LOG: Attempting download of
new URL file:///C:/WINNT/Microsoft.NET/Framework/v1.1.4322/Temporary

ASP.NET
Files/root/04a27ca2/cc847738/<**>.<**>.Web.C ustom.DLL.&#xD; &#xA;LOG:
Attempting download of new URL
file:///C:/WINNT/Microsoft.NET/Framework/v1.1.4322/Temporary ASP.NET

Files/root/04a27ca2/cc847738/<**>.<**>.Web.C ustom/<**>.<**>.Web.C ustom.DLL.& #xD;&#xA;LOG: Attempting download of new URL file:///C:/Program
Files/<**>/webapps/<**>/Web
Server/wwwroot/bin/<**>.<**>.Web.C ustom.DLL.&#xD; &#xA;"
TargetSite="Sys tem.Type GetType(System. String, Boolean)"

Source="mscorli b">
<StackTrace> at System.Type.Get Type(String typeName, Boolean throwOnError) at <**>.<**>.Web.T ypes.BORequest. Validate()
at <**>.<**>.Web.C ommon.Helpers.S upportSerializa tion.Deserializ e(Stream
sourceXml, Type typeOfObjectToC reate)
at <**>.<**>.Web.C ommon.Helpers.S upportSerializa tion.Deserializ e(String
sourceXml, Type typeOfObjectToC reate)
at

<**>.<**>.Web.w wwroot.Business .ApplicationCon figuration.GetB ORequest(IMSE_R e
quest sourceImseReque st)
at

<**>.<**>.Web.w wwroot.Business .XmlProvider.Ge nerateContextRe quest(IMSE_Requ e
st sourceImseReque st, Authentication& amp; userAuthenticat ion,

BORequest&amp;
boRequestConfig uration)
at <**>.<**>.Web.w wwroot.Business .XmlProvider.Pr ocess(IMSE_Requ est
sourceImseReque st)</StackTrace>
</Exception>
</ExceptionInform ation>

Thanks

Richard.


"Ken Kolda" <ke*******@elli emae-nospamplease.co m> wrote in message
news:eU******** ******@TK2MSFTN GP09.phx.gbl...
Can you give you full text/call stack of the error message?

Ken
"RichB" <ri**********@h otmail.com> wrote in message
news:O1******** ******@TK2MSFTN GP10.phx.gbl...
> Hello,
>
> The .NET application I have just installed at a client web site is
throwing
> a strange error. At first the applications works without any problems, but
> after 10 mins or so Access denied error messages are thrown.
>
> The application, web based, late binds to a series of assemblies,
none of
> which are in the GAC. I have configured the application to impersonate the
> IIS user and have set the user to have access to all relevant

directories
> (wwwroot, wwwroot/bin, Microsoft.Net/framework/v1.1.4322) and
disabled the
> index services service.
>
> After digging a little deeper it seems the error is thrown when

calling > Type.GetType, but like I mentioned earlier everything works fine but

then
> suddenly dies.
>
> Can anybody think why this is the case and what I can do to resolve this > irritating problem.
>
>
> Thanks
>
> Richard.
>
>



Nov 16 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
1513
by: Paul | last post by:
Hi! I have a problem: I've declared some classes and decorated them with my Custom Attributes. (say ClassA and ClassB) Now I have some Type member (in fact this is FieldInfo.FieldType) which is eq. typeof (ClassB). And when I call GetCustomAttributes() for this Type I never gets the attribute, that should be there. When I call GetType().GetCustonAttributes() everything works fine. Doeas object of the requested type for attributes must...
3
16484
by: Mike in Paradise | last post by:
I have an application that is being passed objects which could either be an instance or a Type in the case of a Static Class When you do the GetType on the object that was originally a Static class it gives you a type of "System.RuntimeType" as opposed to the orignal Static Class Typ How do you get access to what type the the Orginal Static Class type was from the RuntimeType?? //Eg Routine...... Object objects = new Object Class1...
0
17803
by: Nashat Wanly | last post by:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnaskdr/html/askgui06032003.asp Don't Lock Type Objects! Why Lock(typeof(ClassName)) or SyncLock GetType(ClassName) Is Bad Rico Mariani, performance architect for the Microsoft® .NET runtime and longtime Microsoft developer, mentioned to Dr. GUI in an e-mail conversation recently that a fairly common practice (and one that's, unfortunately, described in some of our...
0
2533
by: Erwan | last post by:
I have a strange (but very blocking) result when using the smtpmail class from an ASPX page : here is the (very simple !) code... '-------------------------------------------------- mail.To = "el@illico.fr" mail.From = "el@illico.fr" mail.Subject = "test envoi de mail" mail.Body = "test envoi de mail"
2
3308
by: S. Justin Gengo | last post by:
Hi, I've created a component that allows me to store database information for various types of databases my company uses. It uses a collection for each type of database. Everything is working perfectly except when the component is deleted from the page. Here are the details. I add the component to the page from the toolbox and then add items using the collection editor. I can delete those items from the collection using the collection...
6
5184
by: Charles Law | last post by:
I want to do something like this: obj = CType(value, Value.Type) Well, not exactly, but I think that captures the essence. I realise it won't work as I have written it, and it looks a bit like a nebulous statement, but I am looking for a generic way to convert a variable of unknown type to its actual type. Perhaps a better example would be
7
7817
by: Sky | last post by:
I have been looking for a more powerful version of GetType(string) that will find the Type no matter what, and will work even if only supplied "{TypeName}", not the full "{TypeName},{AssemblyName}" As far as I know yet -- hence this question -- there is no 'one solution fits all', but instead there are several parts that have to be put together to check. What I have so far is, and would like as much feedback as possible to ensure I've...
1
2155
by: Sky | last post by:
Yesterday I was told that GetType(string) should not just be with a Type, but be Type, AssemblyName. Fair enough, get the reason. (Finally!). As long as it doesn't cause tech support problems down the line... What happens when my code is run on a station that only has framework 3.0 or 4.0, and this assembly, with version number defined for 2.0.0.0 , isn't available. ...breaks? Second question: Does an assembly's PublicKeyToken change...
6
4133
by: passionateforjava | last post by:
Hi All, I am using struts application wherein I need to import file for some purpose.I have used input type="file" for the same which goes like: <input type="file" id="uploadFile" name="uploadFile" size="50"> I have the import button on which I have used onClick event to call javascript function submitValues() used to validate all the fields from the page which goes like: <input type="button" name="select" value="Import" class="CSSButton"...
0
9577
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9339
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9256
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6804
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6081
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4887
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3322
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2804
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2225
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.