473,326 Members | 2,076 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

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 2699
Can you give you full text/call stack of the error message?

Ken
"RichB" <ri**********@hotmail.com> wrote in message
news:O1**************@TK2MSFTNGP10.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 <**>.

<ExceptionInformation>
<AdditionalInformationProperty ExceptionManager.MachineName="<**>"
ExceptionManager.TimeStamp="8/13/2004 8:36:37 AM"
ExceptionManager.FullName="Microsoft.ApplicationBl ocks.ExceptionManagement,
Version=1.0.1656.18979, Culture=neutral, PublicKeyToken=3dcf13b858d6259b"
ExceptionManager.AppDomainName="/LM/w3svc/3/Root-6-127368007456178050"
ExceptionManager.ThreadIdentity="" ExceptionManager.WindowsIdentity="<**>"/>
<Exception ExceptionType="System.IO.FileLoadException" Message="Access is
denied: '<**>.<**>.Web.Custom'." FileName="<**>.<**>.Web.Custom"
FusionLog="=== Pre-bind state information ===&#xD;&#xA;LOG: DisplayName =
<**>.<**>.Web.Custom, Version=1.0.0.0, Culture=neutral,
PublicKeyToken=3dcf13b858d6259b&#xA; (Fully-specified)&#xD;&#xA;LOG: Appbase
= file:///C:/Program Files/<**>/webapps/<**>/Web
Server/wwwroot&#xD;&#xA;LOG: Initial PrivatePath = bin&#xD;&#xA;Calling
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.Custom.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.Custom/<**>.<**>.Web.Custom.DLL.&
#xD;&#xA;LOG: Attempting download of new URL file:///C:/Program
Files/<**>/webapps/<**>/Web
Server/wwwroot/bin/<**>.<**>.Web.Custom.DLL.&#xD;&#xA;"
TargetSite="System.Type GetType(System.String, Boolean)" Source="mscorlib">
<StackTrace> at System.Type.GetType(String typeName, Boolean throwOnError)
at <**>.<**>.Web.Types.BORequest.Validate()
at <**>.<**>.Web.Common.Helpers.SupportSerialization. Deserialize(Stream
sourceXml, Type typeOfObjectToCreate)
at <**>.<**>.Web.Common.Helpers.SupportSerialization. Deserialize(String
sourceXml, Type typeOfObjectToCreate)
at
<**>.<**>.Web.wwwroot.Business.ApplicationConfigur ation.GetBORequest(IMSE_Re
quest sourceImseRequest)
at
<**>.<**>.Web.wwwroot.Business.XmlProvider.Generat eContextRequest(IMSE_Reque
st sourceImseRequest, Authentication&amp; userAuthentication, BORequest&amp;
boRequestConfiguration)
at <**>.<**>.Web.wwwroot.Business.XmlProvider.Process (IMSE_Request
sourceImseRequest)</StackTrace>
</Exception>
</ExceptionInformation>

Thanks

Richard.


"Ken Kolda" <ke*******@elliemae-nospamplease.com> wrote in message
news:eU**************@TK2MSFTNGP09.phx.gbl...
Can you give you full text/call stack of the error message?

Ken
"RichB" <ri**********@hotmail.com> wrote in message
news:O1**************@TK2MSFTNGP10.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 FileLoadException (as opposed to a
TypeLoadException) 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**********@hotmail.com> wrote in message
news:Ow****************@TK2MSFTNGP10.phx.gbl...
Ken,

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

<ExceptionInformation>
<AdditionalInformationProperty ExceptionManager.MachineName="<**>"
ExceptionManager.TimeStamp="8/13/2004 8:36:37 AM"
ExceptionManager.FullName="Microsoft.ApplicationBl ocks.ExceptionManagement, Version=1.0.1656.18979, Culture=neutral, PublicKeyToken=3dcf13b858d6259b"
ExceptionManager.AppDomainName="/LM/w3svc/3/Root-6-127368007456178050"
ExceptionManager.ThreadIdentity="" ExceptionManager.WindowsIdentity="<**>"/> <Exception ExceptionType="System.IO.FileLoadException" Message="Access is
denied: '<**>.<**>.Web.Custom'." FileName="<**>.<**>.Web.Custom"
FusionLog="=== Pre-bind state information ===&#xD;&#xA;LOG: DisplayName =
<**>.<**>.Web.Custom, Version=1.0.0.0, Culture=neutral,
PublicKeyToken=3dcf13b858d6259b&#xA; (Fully-specified)&#xD;&#xA;LOG: Appbase = file:///C:/Program Files/<**>/webapps/<**>/Web
Server/wwwroot&#xD;&#xA;LOG: Initial PrivatePath = bin&#xD;&#xA;Calling
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.Custom.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.Custom/<**>.<**>.Web.Custom.DLL.& #xD;&#xA;LOG: Attempting download of new URL file:///C:/Program
Files/<**>/webapps/<**>/Web
Server/wwwroot/bin/<**>.<**>.Web.Custom.DLL.&#xD;&#xA;"
TargetSite="System.Type GetType(System.String, Boolean)" Source="mscorlib"> <StackTrace> at System.Type.GetType(String typeName, Boolean throwOnError)
at <**>.<**>.Web.Types.BORequest.Validate()
at <**>.<**>.Web.Common.Helpers.SupportSerialization. Deserialize(Stream
sourceXml, Type typeOfObjectToCreate)
at <**>.<**>.Web.Common.Helpers.SupportSerialization. Deserialize(String
sourceXml, Type typeOfObjectToCreate)
at
<**>.<**>.Web.wwwroot.Business.ApplicationConfigur ation.GetBORequest(IMSE_Re quest sourceImseRequest)
at
<**>.<**>.Web.wwwroot.Business.XmlProvider.Generat eContextRequest(IMSE_Reque st sourceImseRequest, Authentication&amp; userAuthentication, BORequest&amp; boRequestConfiguration)
at <**>.<**>.Web.wwwroot.Business.XmlProvider.Process (IMSE_Request
sourceImseRequest)</StackTrace>
</Exception>
</ExceptionInformation>

Thanks

Richard.


"Ken Kolda" <ke*******@elliemae-nospamplease.com> wrote in message
news:eU**************@TK2MSFTNGP09.phx.gbl...
Can you give you full text/call stack of the error message?

Ken
"RichB" <ri**********@hotmail.com> wrote in message
news:O1**************@TK2MSFTNGP10.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*******@elliemae-nospamplease.com> wrote in message
news:u6**************@TK2MSFTNGP12.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 FileLoadException (as opposed to a TypeLoadException) 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**********@hotmail.com> wrote in message
news:Ow****************@TK2MSFTNGP10.phx.gbl...
Ken,

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

<ExceptionInformation>
<AdditionalInformationProperty ExceptionManager.MachineName="<**>"
ExceptionManager.TimeStamp="8/13/2004 8:36:37 AM"

ExceptionManager.FullName="Microsoft.ApplicationBl ocks.ExceptionManagement,
Version=1.0.1656.18979, Culture=neutral, PublicKeyToken=3dcf13b858d6259b"
ExceptionManager.AppDomainName="/LM/w3svc/3/Root-6-127368007456178050"
ExceptionManager.ThreadIdentity=""

ExceptionManager.WindowsIdentity="<**>"/>
<Exception ExceptionType="System.IO.FileLoadException" Message="Access is denied: '<**>.<**>.Web.Custom'." FileName="<**>.<**>.Web.Custom"
FusionLog="=== Pre-bind state information ===&#xD;&#xA;LOG: DisplayName = <**>.<**>.Web.Custom, Version=1.0.0.0, Culture=neutral,
PublicKeyToken=3dcf13b858d6259b&#xA; (Fully-specified)&#xD;&#xA;LOG:

Appbase
= file:///C:/Program Files/<**>/webapps/<**>/Web
Server/wwwroot&#xD;&#xA;LOG: Initial PrivatePath = bin&#xD;&#xA;Calling
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.Custom.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.Custom/<**>.<**>.Web.Custom.DLL.& #xD;&#xA;LOG: Attempting download of new URL file:///C:/Program
Files/<**>/webapps/<**>/Web
Server/wwwroot/bin/<**>.<**>.Web.Custom.DLL.&#xD;&#xA;"
TargetSite="System.Type GetType(System.String, Boolean)"

Source="mscorlib">
<StackTrace> at System.Type.GetType(String typeName, Boolean throwOnError) at <**>.<**>.Web.Types.BORequest.Validate()
at <**>.<**>.Web.Common.Helpers.SupportSerialization. Deserialize(Stream
sourceXml, Type typeOfObjectToCreate)
at <**>.<**>.Web.Common.Helpers.SupportSerialization. Deserialize(String
sourceXml, Type typeOfObjectToCreate)
at

<**>.<**>.Web.wwwroot.Business.ApplicationConfigur ation.GetBORequest(IMSE_Re
quest sourceImseRequest)
at

<**>.<**>.Web.wwwroot.Business.XmlProvider.Generat eContextRequest(IMSE_Reque
st sourceImseRequest, Authentication&amp; userAuthentication,

BORequest&amp;
boRequestConfiguration)
at <**>.<**>.Web.wwwroot.Business.XmlProvider.Process (IMSE_Request
sourceImseRequest)</StackTrace>
</Exception>
</ExceptionInformation>

Thanks

Richard.


"Ken Kolda" <ke*******@elliemae-nospamplease.com> wrote in message
news:eU**************@TK2MSFTNGP09.phx.gbl...
Can you give you full text/call stack of the error message?

Ken
"RichB" <ri**********@hotmail.com> wrote in message
news:O1**************@TK2MSFTNGP10.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
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...
3
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...
0
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...
0
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 =...
2
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...
6
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...
7
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}"...
1
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...
6
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"...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.