System.UnauthorizedAccessException: Access to the path "d:\inetpub\wwwroot\web.config" is denied.

J

job

In a sharepoint setup using smartpart to load our user controls using
enterprise blocks (data) we are getting some strange errors (logged to
the event log). We dont get the error all the time. When we get the
error CPU goes 100%

We have been through all we can think of, but have not been able to
locate the source to the error.

Any suggestions?

Entry@12-09-2006 14:35:08: System.UnauthorizedAccessException: Access
to the path "d:\inetpub\wwwroot\web.config" is denied.
at System.IO.__Error.WinIOError(Int32 errorCode, String str)
at System.IO.FileStream..ctor(String path, FileMode mode,
FileAccess access, FileShare share, Int32 bufferSize, Boolean
useAsync, String msgPath, Boolean bFromProxy)
at System.IO.FileStream..ctor(String path, FileMode mode,
FileAccess access, FileShare share)
at System.Xml.XmlDownloadManager.GetStream(Uri uri, ICredentials
credentials)
at System.Xml.XmlUrlResolver.GetEntity(Uri absoluteUri, String
role, Type ofObjectToReturn)
at System.Xml.XmlTextReader.CreateScanner()
at System.Xml.XmlTextReader.Init()
at System.Xml.XmlTextReader.Read()
at System.Xml.XmlValidatingReader.ReadWithCollectTextToken()
at System.Xml.XmlValidatingReader.Read()
at System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader,
Boolean preserveWhitespace)
at System.Xml.XmlDocument.Load(XmlReader reader)
at System.Xml.XmlDocument.Load(String filename)
at
Microsoft.Practices.EnterpriseLibrary.Configuration.ConfigurationSettingsLoader.Build(String
configurationFile)
at
Microsoft.Practices.EnterpriseLibrary.Configuration.ConfigurationFile.GetConfig(String
configKey)
at
Microsoft.Practices.EnterpriseLibrary.Configuration.ConfigurationBuilder.ReadMetaConfiguration()
at
Microsoft.Practices.EnterpriseLibrary.Configuration.ConfigurationBuilder.LoadMetaConfiguration(String
configurationFile)
at
Microsoft.Practices.EnterpriseLibrary.Configuration.ConfigurationBuilder..ctor()
at
Microsoft.Practices.EnterpriseLibrary.Configuration.ConfigurationManager..ctor()
at
Microsoft.Practices.EnterpriseLibrary.Configuration.ConfigurationManager.get_Current()
at
Microsoft.Practices.EnterpriseLibrary.Configuration.ConfigurationManager.GetCurrentContext()
at
Microsoft.Practices.EnterpriseLibrary.Data.DatabaseFactory.CreateDatabase()
at Team.AM.UK2000BussinessLogic.CreateDatabase.Get()
at Team.AM.UK2000Utils.CessionHelper.get_PersonaleNummerAktor()
at
Team.AM.UK2000UserControls.Flytning_FlytteStatus_Med_Parameter.Flytning_FlytteStatus_DataBinding(Object
sender, EventArgs e)
at System.Web.UI.Control.OnDataBinding(EventArgs e)
at System.Web.UI.Control.DataBind()
at
Team.AM.UK2000UserControls.Flytning_FlytteStatus_Med_Parameter.Flytning_FlytteStatus_Med_Parameter_PreRender(Object
sender, EventArgs e)
at System.EventHandler.Invoke(Object sender, EventArgs e)
at System.Web.UI.Control.OnPreRender(EventArgs e)
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Page.ProcessRequestMain()Exception info:
System.UnauthorizedAccessException: Access to the path
"d:\inetpub\wwwroot\web.config" is denied.
at System.IO.__Error.WinIOError(Int32 errorCode, String str)
at System.IO.FileStream..ctor(String path, FileMode mode,
FileAccess access, FileShare share, Int32 bufferSize, Boolean
useAsync, String msgPath, Boolean bFromProxy)
at System.IO.FileStream..ctor(String path, FileMode mode,
FileAccess access, FileShare share)
at System.Xml.XmlDownloadManager.GetStream(Uri uri, ICredentials
credentials)
at System.Xml.XmlUrlResolver.GetEntity(Uri absoluteUri, String
role, Type ofObjectToReturn)
at System.Xml.XmlTextReader.CreateScanner()
at System.Xml.XmlTextReader.Init()
at System.Xml.XmlTextReader.Read()
at System.Xml.XmlValidatingReader.ReadWithCollectTextToken()
at System.Xml.XmlValidatingReader.Read()
at System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader,
Boolean preserveWhitespace)
at System.Xml.XmlDocument.Load(XmlReader reader)
at System.Xml.XmlDocument.Load(String filename)
at
Microsoft.Practices.EnterpriseLibrary.Configuration.ConfigurationSettingsLoader.Build(String
configurationFile)
at
Microsoft.Practices.EnterpriseLibrary.Configuration.ConfigurationFile.GetConfig(String
configKey)
at
Microsoft.Practices.EnterpriseLibrary.Configuration.ConfigurationBuilder.ReadMetaConfiguration()
at
Microsoft.Practices.EnterpriseLibrary.Configuration.ConfigurationBuilder.LoadMetaConfiguration(String
configurationFile)
at
Microsoft.Practices.EnterpriseLibrary.Configuration.ConfigurationBuilder..ctor()
at
Microsoft.Practices.EnterpriseLibrary.Configuration.ConfigurationManager..ctor()
at
Microsoft.Practices.EnterpriseLibrary.Configuration.ConfigurationManager.get_Current()
at
Microsoft.Practices.EnterpriseLibrary.Configuration.ConfigurationManager.GetCurrentContext()
at
Microsoft.Practices.EnterpriseLibrary.Data.DatabaseFactory.CreateDatabase()
at Team.AM.UK2000BussinessLogic.CreateDatabase.Get()
at Team.AM.UK2000Utils.CessionHelper.get_PersonaleNummerAktor()
at
Team.AM.UK2000UserControls.Flytning_FlytteStatus_Med_Parameter.Flytning_FlytteStatus_DataBinding(Object
sender, EventArgs e)
at System.Web.UI.Control.OnDataBinding(EventArgs e)
at System.Web.UI.Control.DataBind()
at
Team.AM.UK2000UserControls.Flytning_FlytteStatus_Med_Parameter.Flytning_FlytteStatus_Med_Parameter_PreRender(Object
sender, EventArgs e)
at System.EventHandler.Invoke(Object sender, EventArgs e)
at System.Web.UI.Control.OnPreRender(EventArgs e)
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Page.ProcessRequestMain()
 
M

manpreetsinghbhatia

hi
give full permission to evryone of web.config

It is working.:)

Thanks
Manpreet Singh
 
M

manpreetsinghbhatia

whenever we make any web application , there is permission for
everyone to read the web.config, so you have to give the read
permission to everyone , so every user can read the web.config. this is
excat solution of that problem

Thanks
Manpreet Singh
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top