jimseiwert
asked on
.net localhost vs custom web server
I have a web app that has a video player in it. When i run the website under visual studio web server localhost:port it works just fine.
As soon as I run it from iis default website i get the following error
Log Name: Application
Source: ASP.NET 2.0.50727.0
Date: 7/10/2009 2:48:29 PM
Event ID: 1310
Task Category: Web Event
Level: Warning
Keywords: Classic
User: N/A
Computer: Jim-PC
Description:
Event code: 3006
Event message: A parser error has occurred.
Event time: 7/10/2009 2:48:29 PM
Event time (UTC): 7/10/2009 7:48:29 PM
Event ID: 979d23fad7a0409083d31adf2b 6df70e
Event sequence: 17
Event occurrence: 1
Event detail code: 0
Application information:
Application domain: /LM/W3SVC/1/ROOT-8-1289172 8868215312 5
Trust level: Full
Application Virtual Path: /
Application Path: C:\inetpub\wwwroot\ecpinc1 .net\web\
Machine name: JIM-PC
Process information:
Process ID: 6424
Process name: w3wp.exe
Account name: IIS APPPOOL\DefaultAppPool
Exception information:
Exception type: HttpParseException
Exception message: Request for the permission of type 'System.Web.AspNetHostingP ermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c56193 4e089' failed.
Request information:
Request URL: http://localhost/members/Videos/Player/ASPNetFlashVideo/HelloWorld/Default.aspx
Request path: /members/Videos/Player/ASP NetFlashVi deo/HelloW orld/Defau lt.aspx
User host address: ::1
User:
Is authenticated: False
Authentication Type:
Thread account name: IIS APPPOOL\DefaultAppPool
Thread information:
Thread ID: 8
Thread account name: IIS APPPOOL\DefaultAppPool
Is impersonating: False
Stack trace: at System.Web.UI.TemplatePars er.Process Exception( Exception ex)
at System.Web.UI.TemplatePars er.ParseSt ringIntern al(String text, Encoding fileEncoding)
at System.Web.UI.TemplatePars er.ParseSt ring(Strin g text, VirtualPath virtualPath, Encoding fileEncoding)
at System.Web.UI.TemplatePars er.ParseFi le(String physicalPath, VirtualPath virtualPath)
at System.Web.UI.TemplatePars er.ParseIn ternal()
at System.Web.UI.TemplatePars er.Parse()
at System.Web.Compilation.Bas eTemplateB uildProvid er.get_Cod eCompilerT ype()
at System.Web.Compilation.Bui ldProvider .GetCompil erTypeFrom BuildProvi der(BuildP rovider buildProvider)
at System.Web.Compilation.Bui ldProvider sCompiler. ProcessBui ldProvider s()
at System.Web.Compilation.Bui ldProvider sCompiler. PerformBui ld()
at System.Web.Compilation.Bui ldManager. CompileWeb File(Virtu alPath virtualPath)
at System.Web.Compilation.Bui ldManager. GetVPathBu ildResultI nternal(Vi rtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile)
at System.Web.Compilation.Bui ldManager. GetVPathBu ildResultW ithNoAsser t(HttpCont ext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile)
at System.Web.Compilation.Bui ldManager. GetVirtual PathObject Factory(Vi rtualPath virtualPath, HttpContext context, Boolean allowCrossApp, Boolean noAssert)
at System.Web.Compilation.Bui ldManager. CreateInst anceFromVi rtualPath( VirtualPat h virtualPath, Type requiredBaseType, HttpContext context, Boolean allowCrossApp, Boolean noAssert)
at System.Web.UI.PageHandlerF actory.Get HandlerHel per(HttpCo ntext context, String requestType, VirtualPath virtualPath, String physicalPath)
at System.Web.HttpApplication .MapHttpHa ndler(Http Context context, String requestType, VirtualPath path, String pathTranslated, Boolean useAppConfig)
at System.Web.HttpApplication .MapHandle rExecution Step.Syste m.Web.Http Applicatio n.IExecuti onStep.Exe cute()
at System.Web.HttpApplication .ExecuteSt ep(IExecut ionStep step, Boolean& completedSynchronously)
Custom event details:
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
<System>
<Provider Name="ASP.NET 2.0.50727.0" />
<EventID Qualifiers="32768">1310</E ventID>
<Level>3</Level>
<Task>3</Task>
<Keywords>0x80000000000000 </Keywords >
<TimeCreated SystemTime="2009-07-10T19: 48:29.0000 00000Z" />
<EventRecordID>2848</Event RecordID>
<Channel>Application</Chan nel>
<Computer>Jim-PC</Computer >
<Security />
</System>
<EventData>
<Data>3006</Data>
<Data>A parser error has occurred.</Data>
<Data>7/10/2009 2:48:29 PM</Data>
<Data>7/10/2009 7:48:29 PM</Data>
<Data>979d23fad7a0409083d3 1adf2b6df7 0e</Data>
<Data>17</Data>
<Data>1</Data>
<Data>0</Data>
<Data>/LM/W3SVC/1/ROOT-8-1 2891728868 2153125</D ata>
<Data>Full</Data>
<Data>/</Data>
<Data>C:\inetpub\wwwroot\e cpinc1.net \web\</Dat a>
<Data>JIM-PC</Data>
<Data>
</Data>
<Data>6424</Data>
<Data>w3wp.exe</Data>
<Data>IIS APPPOOL\DefaultAppPool</Da ta>
<Data>HttpParseException</ Data>
<Data>Request for the permission of type 'System.Web.AspNetHostingP ermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c56193 4e089' failed.</Data>
<Data>http://localhost/members/Videos/Player/ASPNetFlashVideo/HelloWorld/Default.aspx</Data>
<Data>/members/Videos/Play er/ASPNetF lashVideo/ HelloWorld /Default.a spx</Data>
<Data>::1</Data>
<Data>
</Data>
<Data>False</Data>
<Data>
</Data>
<Data>IIS APPPOOL\DefaultAppPool</Da ta>
<Data>8</Data>
<Data>IIS APPPOOL\DefaultAppPool</Da ta>
<Data>False</Data>
<Data> at System.Web.UI.TemplatePars er.Process Exception( Exception ex)
at System.Web.UI.TemplatePars er.ParseSt ringIntern al(String text, Encoding fileEncoding)
at System.Web.UI.TemplatePars er.ParseSt ring(Strin g text, VirtualPath virtualPath, Encoding fileEncoding)
at System.Web.UI.TemplatePars er.ParseFi le(String physicalPath, VirtualPath virtualPath)
at System.Web.UI.TemplatePars er.ParseIn ternal()
at System.Web.UI.TemplatePars er.Parse()
at System.Web.Compilation.Bas eTemplateB uildProvid er.get_Cod eCompilerT ype()
at System.Web.Compilation.Bui ldProvider .GetCompil erTypeFrom BuildProvi der(BuildP rovider buildProvider)
at System.Web.Compilation.Bui ldProvider sCompiler. ProcessBui ldProvider s()
at System.Web.Compilation.Bui ldProvider sCompiler. PerformBui ld()
at System.Web.Compilation.Bui ldManager. CompileWeb File(Virtu alPath virtualPath)
at System.Web.Compilation.Bui ldManager. GetVPathBu ildResultI nternal(Vi rtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile)
at System.Web.Compilation.Bui ldManager. GetVPathBu ildResultW ithNoAsser t(HttpCont ext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile)
at System.Web.Compilation.Bui ldManager. GetVirtual PathObject Factory(Vi rtualPath virtualPath, HttpContext context, Boolean allowCrossApp, Boolean noAssert)
at System.Web.Compilation.Bui ldManager. CreateInst anceFromVi rtualPath( VirtualPat h virtualPath, Type requiredBaseType, HttpContext context, Boolean allowCrossApp, Boolean noAssert)
at System.Web.UI.PageHandlerF actory.Get HandlerHel per(HttpCo ntext context, String requestType, VirtualPath virtualPath, String physicalPath)
at System.Web.HttpApplication .MapHttpHa ndler(Http Context context, String requestType, VirtualPath path, String pathTranslated, Boolean useAppConfig)
at System.Web.HttpApplication .MapHandle rExecution Step.Syste m.Web.Http Applicatio n.IExecuti onStep.Exe cute()
at System.Web.HttpApplication .ExecuteSt ep(IExecut ionStep step, Boolean& completedSynchronously)
</Data>
</EventData>
</Event>
As soon as I run it from iis default website i get the following error
Log Name: Application
Source: ASP.NET 2.0.50727.0
Date: 7/10/2009 2:48:29 PM
Event ID: 1310
Task Category: Web Event
Level: Warning
Keywords: Classic
User: N/A
Computer: Jim-PC
Description:
Event code: 3006
Event message: A parser error has occurred.
Event time: 7/10/2009 2:48:29 PM
Event time (UTC): 7/10/2009 7:48:29 PM
Event ID: 979d23fad7a0409083d31adf2b
Event sequence: 17
Event occurrence: 1
Event detail code: 0
Application information:
Application domain: /LM/W3SVC/1/ROOT-8-1289172
Trust level: Full
Application Virtual Path: /
Application Path: C:\inetpub\wwwroot\ecpinc1
Machine name: JIM-PC
Process information:
Process ID: 6424
Process name: w3wp.exe
Account name: IIS APPPOOL\DefaultAppPool
Exception information:
Exception type: HttpParseException
Exception message: Request for the permission of type 'System.Web.AspNetHostingP
Request information:
Request URL: http://localhost/members/Videos/Player/ASPNetFlashVideo/HelloWorld/Default.aspx
Request path: /members/Videos/Player/ASP
User host address: ::1
User:
Is authenticated: False
Authentication Type:
Thread account name: IIS APPPOOL\DefaultAppPool
Thread information:
Thread ID: 8
Thread account name: IIS APPPOOL\DefaultAppPool
Is impersonating: False
Stack trace: at System.Web.UI.TemplatePars
at System.Web.UI.TemplatePars
at System.Web.UI.TemplatePars
at System.Web.UI.TemplatePars
at System.Web.UI.TemplatePars
at System.Web.UI.TemplatePars
at System.Web.Compilation.Bas
at System.Web.Compilation.Bui
at System.Web.Compilation.Bui
at System.Web.Compilation.Bui
at System.Web.Compilation.Bui
at System.Web.Compilation.Bui
at System.Web.Compilation.Bui
at System.Web.Compilation.Bui
at System.Web.Compilation.Bui
at System.Web.UI.PageHandlerF
at System.Web.HttpApplication
at System.Web.HttpApplication
at System.Web.HttpApplication
Custom event details:
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
<System>
<Provider Name="ASP.NET 2.0.50727.0" />
<EventID Qualifiers="32768">1310</E
<Level>3</Level>
<Task>3</Task>
<Keywords>0x80000000000000
<TimeCreated SystemTime="2009-07-10T19:
<EventRecordID>2848</Event
<Channel>Application</Chan
<Computer>Jim-PC</Computer
<Security />
</System>
<EventData>
<Data>3006</Data>
<Data>A parser error has occurred.</Data>
<Data>7/10/2009 2:48:29 PM</Data>
<Data>7/10/2009 7:48:29 PM</Data>
<Data>979d23fad7a0409083d3
<Data>17</Data>
<Data>1</Data>
<Data>0</Data>
<Data>/LM/W3SVC/1/ROOT-8-1
<Data>Full</Data>
<Data>/</Data>
<Data>C:\inetpub\wwwroot\e
<Data>JIM-PC</Data>
<Data>
</Data>
<Data>6424</Data>
<Data>w3wp.exe</Data>
<Data>IIS APPPOOL\DefaultAppPool</Da
<Data>HttpParseException</
<Data>Request for the permission of type 'System.Web.AspNetHostingP
<Data>http://localhost/members/Videos/Player/ASPNetFlashVideo/HelloWorld/Default.aspx</Data>
<Data>/members/Videos/Play
<Data>::1</Data>
<Data>
</Data>
<Data>False</Data>
<Data>
</Data>
<Data>IIS APPPOOL\DefaultAppPool</Da
<Data>8</Data>
<Data>IIS APPPOOL\DefaultAppPool</Da
<Data>False</Data>
<Data> at System.Web.UI.TemplatePars
at System.Web.UI.TemplatePars
at System.Web.UI.TemplatePars
at System.Web.UI.TemplatePars
at System.Web.UI.TemplatePars
at System.Web.UI.TemplatePars
at System.Web.Compilation.Bas
at System.Web.Compilation.Bui
at System.Web.Compilation.Bui
at System.Web.Compilation.Bui
at System.Web.Compilation.Bui
at System.Web.Compilation.Bui
at System.Web.Compilation.Bui
at System.Web.Compilation.Bui
at System.Web.Compilation.Bui
at System.Web.UI.PageHandlerF
at System.Web.HttpApplication
at System.Web.HttpApplication
at System.Web.HttpApplication
</Data>
</EventData>
</Event>
ASKER
That is what I thought and for the dev machine all zones are at full trust level (changed them trying to resolve this issue.) here is the code when I add the below html is when i get that error. It is an example that I am just trying to get to work.
All the solution files are on my local machine. Nothing on a remote machine or a shared folder. This is also with visual studio 2008, and works fine under visual studio web server just not under iis independently.
Thank you for your help
All the solution files are on my local machine. Nothing on a remote machine or a shared folder. This is also with visual studio 2008, and works fine under visual studio web server just not under iis independently.
Thank you for your help
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="members_Videos_Player_Default" %>
<%@ Register Assembly="ASPNetFlashVideo.NET3" Namespace="ASPNetFlashVideo" TagPrefix="ASPNetFlashVideo" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title>ASPNetMedia Demonstration</title>
<link href="css/ASPNetMediaDemo.css" rel="stylesheet" type="text/css" />
</head>
<body>
<form id="form1" runat="server">
<div id="content">
<asp:ScriptManager ID="ScriptManager1" runat="server" />
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<ASPNetFlashVideo:FlashVideo ID="FlashVideo1" runat="server" VideoURL="http://www.aspnetflashvideo.com/videos/bbc.flv">
<HTMLAlternativeTemplate>
<asp:ImageButton ID="ImageButtonGetFlashPlayer" runat="server" PostBackUrl="http://www.adobe.com/go/getflashplayer" ImageUrl="http://www.aspnetflashvideo.com/images/get_flash_player.gif" />
</HTMLAlternativeTemplate>
</ASPNetFlashVideo:FlashVideo>
<br />
</ContentTemplate>
</asp:UpdatePanel>
</div>
</form>
</body>
</html>
ASKER
and the stack trace
Server Error in '/' Application.
--------------------------------------------------------------------------------
Security Exception
Description: The application attempted to perform an operation not allowed by the security policy. To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file.
Exception Details: System.Security.SecurityException: Request for the permission of type 'System.Web.AspNetHostingPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
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:
[SecurityException: Request for the permission of type 'System.Web.AspNetHostingPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.]
System.Reflection.Assembly._GetType(String name, Boolean throwOnError, Boolean ignoreCase) +0
System.Web.UI.NamespaceTagNameToTypeMapper.GetControlType(String tagName, IDictionary attribs, Boolean throwOnError) +209
System.Web.UI.TagPrefixTagNameToTypeMapper.System.Web.UI.ITagNameToTypeMapper.GetControlType(String tagName, IDictionary attribs) +210
System.Web.UI.MainTagNameToTypeMapper.GetControlType2(String tagName, IDictionary attribs, Boolean fAllowHtmlTags) +242
System.Web.UI.MainTagNameToTypeMapper.GetControlType(String tagName, IDictionary attribs, Boolean fAllowHtmlTags) +17
System.Web.UI.RootBuilder.GetChildControlType(String tagName, IDictionary attribs) +22
System.Web.UI.ControlBuilder.CreateChildBuilder(String filter, String tagName, IDictionary attribs, TemplateParser parser, ControlBuilder parentBuilder, String id, Int32 line, VirtualPath virtualPath, Type& childType, Boolean defaultProperty) +119
System.Web.UI.TemplateParser.ProcessBeginTag(Match match, String inputText) +605
System.Web.UI.TemplateParser.ParseStringInternal(String text, Encoding fileEncoding) +1334
Try adding the line in bold to your config file :
<connectionStrings/>
<system.web>
<trust level="Full"/>
<!--
Set compilation debug="true" to insert debugging
symbols into the compiled page. Because this
affects performance, set this value to true only
during development.
Visual Basic options:
Set strict="true" to disallow all data type conversions
where data loss can occur.
Set explicit="true" to force declaration of all variables.
-->
<webServices>
<protocols>
<add name="HttpGet"/>
<add name="HttpPost"/>
</protocols>
</webServices>
<connectionStrings/>
<system.web>
<trust level="Full"/>
<!--
Set compilation debug="true" to insert debugging
symbols into the compiled page. Because this
affects performance, set this value to true only
during development.
Visual Basic options:
Set strict="true" to disallow all data type conversions
where data loss can occur.
Set explicit="true" to force declaration of all variables.
-->
<webServices>
<protocols>
<add name="HttpGet"/>
<add name="HttpPost"/>
</protocols>
</webServices>
ASKER
I tried that and still got the same error
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
To resolve this issue, you must change your development machine .net security configuration since you are accessing items across the network. In the event that you need this ability at runtime, you must change the trust level in your config file to full. However, since this is only in development, I can change my local PC's security by going to Start > Control Panel > Administrative Tools > Microsoft .NET Framework 2.0 Configuration. After it fully loads (sometimes takes a bit), fully expand My Computer in the navigation tree and click Runtime Security Policy. In the right hand pane, choose Adjust Zone Security. Leave the default option (Make changes to this computer) and hit next. Choose Local Intranet and change the trust level to Full Trust. Then choose next and then finish. Restart Visual Studio 2005 and you should be all set.
"
http://weblogs.asp.net/jga
Also check out :
http://support.microsoft.c