Last post Feb 09, 2006 12:12 PM by DotNetSteve2005
Feb 05, 2006 04:21 PM|DotNetSteve2005|LINK
My hoster recently switched to ASP.NET 2.0, I am doing likewise and creating a site in Visual Studio 2005. The problem is that some of the newer 2.0 classes are throwing security exceptions.
1. Trying to read from the web config file.
2. Trying to get a filename from a path.
Example Reading from the config file-1.
Label1.Text = ConfigurationSettings.GetConfig("connectionStrings").ConnectionStrings(1).ConnectionString
Section = System.Web.Configuration.WebConfigurationManager.OpenWebConfiguration(
ConnectionString = Section.ConnectionStrings.Item(
Label1.Text = ConnectionString
Example Getting a filename - 2.
Dim c As
String = My.Computer.FileSystem.GetFileInfo(FUL.FileName).Name()
My question is, is there a way to determine what levels of security I need to request from my hoster to make these things work?
Thanks in advance,
Feb 06, 2006 12:11 AM|Blake05|LINK
Feb 06, 2006 05:30 AM|smiling4ever|LINK
You cannot determine or set the security level of your application your self. You have to ask your hosting provider to increase the Trust Level in order to clear the security exception. If you need more information about that just let me know.
Feb 09, 2006 12:12 PM|DotNetSteve2005|LINK
Is there a way to determine the setting from the Help files when you look at the particular objects?