Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Server Error in "/' Application

Status
Not open for further replies.

crstuart99

Technical User
Joined
Apr 22, 2006
Messages
9
Location
US
I'm getting this error with my asp page...I've changed the web.config file to on and off..and still getting this page...i've also included my code after the error...anyone see any problems...

Server Error in '/' Application.
--------------------------------------------------------------------------------

Runtime Error
Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.

Details: To enable the details of this specific error message to be viewable on remote machines, please create a <customErrors> tag within a "web.config" configuration file located in the root directory of the current web application. This <customErrors> tag should then have its "mode" attribute set to "Off".

<%@ Page Language="VB" %>
<%@ Register tagPrefix="web" Assembly="WebChart" Namespace="WebChart" %>
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="System.Data.OleDb" %>
<script runat=server>
Sub Page_Load(o as object, e as EventArgs)
Dim reader As IDataReader = GetReader()

Dim chart As New SmoothLineChart()
chart.DataXValueField = "Year"
chart.DataYValueField = "Price"
chart.DataSource = reader
chart.DataBind()
chart.Legend = "This Chart produced by ChartControl1.Legend.Width = 40


ChartControl1.Charts.Add(chart)
ChartControl1.RedrawChart()

End Sub

' Configure some colors for the Chart, this could be done declaratively also


Function GetReader() As IDataReader
Dim connection As New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0; data source=" & Server.MapPath("database/TwentyDollarGold.mdb"))

Dim command As New OleDbCommand("SELECT Price, Year FROM Twenties2 order by Year", connection)
connection.Open()
Return command.ExecuteReader(CommandBehavior.CloseConnection)
End Function
</script>
<html>
<body>
<form id="Form1" runat="server">
<web:ChartControl runat="server" Width="800px" Height="523px"
id="ChartControl1" BottomChartPadding=30 ChartPadding=30 GridLines="Both" ShowTitlesOnBackground="False" TopPadding="30" YCustomEnd="6000" YCustomStart="0" YValuesInterval="500" BorderColor="Black" Legend-Position="Bottom" Background-Color="Yellow" Background-CenterColor="Yellow">
<XAxisFont StringFormat="Center,Center,Character,DirectionVertical" Font="Tahoma, 8pt, style=Bold" />
<YAxisFont StringFormat="Far,Near,Character,LineLimit" />
<XTitle Font="Tahoma, 8pt, style=Bold" ForeColor="SteelBlue" StringFormat="Center,Far,Character,LineLimit" />
<PlotBackground Angle="90" EndPoint="100, 700" ForeColor="#FFFFff" Type="LinearGradient" />
<ChartTitle Font="Tahoma, 15pt, style=Bold" ForeColor="Black" StringFormat="Center,Near,Character,LineLimit" Text="US Gold Coins Price History" />
<Border Color="CornflowerBlue" />
<Background Angle="90" Color="Yellow" EndPoint="100, 400" ForeColor="#80FF80"
Type="LinearGradient" CenterColor="Black" />
<YTitle Font="Tahoma, 8pt, style=Bold" ForeColor="SteelBlue" StringFormat="Near,Near,Character,DirectionVertical" />
</web:ChartControl>
</form>
</body>
</html>
 
Try to get a more detailed error message. Either set the custome errors = off in the web.config, even easier, run the app from the server that IIS is on.
 
Hi jbenson..i've tried setting them to on and off and still get the error..unfortunately i don't have iis...so i've just been running on test server within VWD express...
 
One thing to look at, if you are not in full trust mode, the database needs to be in the app_data directory.

do you have access to the web server? Or is this a hosted application on a hosting company server.?

If you do not have access, contact your host to have them look at the event logs or run the app from localhost/

I spent week once going round and round on something very simular, turned out my host changed permissions from full trust to medium trust.

Since then, I started hosting my own sites.

good luck!
 
thanks..bob..i have the site hosted with another company...now i'm getting this error..any ideas? Also, as an aside...what's the best way to host my own sites..? Thanks!

Server Error in '/' Application.
Required permissions cannot be acquired.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Security.Policy.PolicyException: Required permissions cannot be acquired.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[PolicyException: Required permissions cannot be acquired.]
System.Security.SecurityManager.ResolvePolicy(Evidence evidence, PermissionSet reqdPset, PermissionSet optPset, PermissionSet denyPset, PermissionSet& denied, Boolean checkExecutionPermission) +2738005
System.Security.SecurityManager.ResolvePolicy(Evidence evidence, PermissionSet reqdPset, PermissionSet optPset, PermissionSet denyPset, PermissionSet& denied, Int32& securitySpecialFlags, Boolean checkExecutionPermission) +57

[FileLoadException: Could not load file or assembly 'WebChart, Version=1.1.1.4, Culture=neutral, PublicKeyToken=null' or one of its dependencies. Failed to grant minimum permission requests. (Exception from HRESULT: 0x80131417)]
System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) +0
System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +211
System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +141
System.Reflection.Assembly.Load(String assemblyString) +25
System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +32

[ConfigurationErrorsException: Could not load file or assembly 'WebChart, Version=1.1.1.4, Culture=neutral, PublicKeyToken=null' or one of its dependencies. Failed to grant minimum permission requests. (Exception from HRESULT: 0x80131417)]
System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +596
System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory() +3479065
System.Web.Configuration.CompilationSection.LoadAssembly(AssemblyInfo ai) +46
System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig) +177
System.Web.Compilation.WebDirectoryBatchCompiler..ctor(VirtualDirectory vdir) +267
System.Web.Compilation.BuildManager.BatchCompileWebDirectoryInternal(VirtualDirectory vdir, Boolean ignoreErrors) +36
System.Web.Compilation.BuildManager.BatchCompileWebDirectory(VirtualDirectory vdir, VirtualPath virtualDir, Boolean ignoreErrors) +429
System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath virtualPath) +73
System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile) +580
System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile) +93
System.Web.Compilation.BuildManager.GetVirtualPathObjectFactory(VirtualPath virtualPath, HttpContext context, Boolean allowCrossApp, Boolean noAssert) +111
System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath(VirtualPath virtualPath, Type requiredBaseType, HttpContext context, Boolean allowCrossApp, Boolean noAssert) +54
System.Web.UI.PageHandlerFactory.GetHandlerHelper(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath) +31
System.Web.UI.PageHandlerFactory.System.Web.IHttpHandlerFactory2.GetHandler(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath) +40
System.Web.HttpApplication.MapHttpHandler(HttpContext context, String requestType, VirtualPath path, String pathTranslated, Boolean useAppConfig) +139
System.Web.MapHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +120
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +155
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top