parser error, incorrect function

M

murphy

Hi,


I've been seeing two symptoms with my asp.net site that have started
recently after a long period of smooth running. As others on our team
make changes to referenced dll's I find that I get the following
errors from time to time.


Apparently the following procedure alleviates the problems:


-Reboot (clears locks on following directory)
-Remove all contents of
C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET Files
-Load vs.net
-Rebuild solution


It seems that my cache is getting out of sync and rebuilding alone is
not refreshing it. Since my solution contains many projects, this
procedure is fairly time-consuming. In addition, it's disconcerting
to not understand any such problem.


Ideas? Thanks!


Mark


TWO ERRORS:


1. Parser error


This will occur in different pages in the site as the user control
declarations are apparently being parsed in my aspx files.
Invalid function error. This will refer to multiple copies of a dll
being present (I'm using Microsoft's Enterprise Localization
Framework and it's the ELF dll that's being complained about).


2. Incorrect Function
This occurs on the application login page. The stack track looks like
this:


Incorrect function.
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.IO.IOException: Incorrect function.


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:


[IOException: Incorrect function.
]
System.IO.__Error.WinIOError(Int32 errorCode, String str) +723
System.IO.FileStream..ctor(String path, FileMode mode, FileAccess
access, FileShare share, Int32 bufferSize, Boolean useAsync, String
msgPath, Boolean bFromProxy) +888
System.IO.FileStream..ctor(String path, FileMode mode, FileAccess
access, FileShare share, Int32 bufferSize) +44
System.IO.StreamReader..ctor(String path, Encoding encoding, Boolean

detectEncodingFromByteOrderMarks, Int32 bufferSize) +79
System.Web.UI.Util.ReaderFromFile(String filename, HttpContext
context, String configPath) +363
System.Web.UI.TemplateParser.ParseFile(String filename, String
virtualPath) +62
System.Web.UI.TemplateParser.Parse() +200

System.Web.UI.TemplateParser.GetParserCacheItemThroughCompil­ation()
+74
System.Web.UI.TemplateParser.GetParserCacheItemInternal(Bool­ean
fCreateIfNotFound) +189
System.Web.UI.TemplateParser.GetParserCacheItemWithNewConfig­Path()

+125
System.Web.UI.TemplateParser.GetParserCacheItem() +88


System.Web.UI.TemplateControlParser.CompileAndGetParserCache­Item(String

virtualPath, String inputFile, HttpContext context) +120
System.Web.UI.TemplateControlParser.GetCompiledInstance(Stri­ng
virtualPath, String inputFile, HttpContext context) +36
System.Web.UI.PageParser.GetCompiledPageInstanceInternal(Str­ing
virtualPath, String inputFile, HttpContext context) +43
System.Web.UI.PageHandlerFactory.GetHandler(HttpContext context,
String requestType, String url, String path) +44
System.Web.HttpApplication.MapHttpHandler(HttpContext context,
String requestType, String path, String pathTranslated, Boolean
useAppConfig) +696


System.Web.MapHandlerExecutionStep.System.Web.HttpApplicatio­n+IExecutionStep.Execute()

+95
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&

completedSynchronously) +173
 
S

Steven Cheng[MSFT]

Hi Murphy,

Thanks for posting. I've also found your other threads in this group. Also,
as I've mentioned in the
"configuration error" post, sometimes when the referenced assemblies be
changed and the referencer hasn't changed its reference metadata, there'll
occurs runtime error of loading assembly.

Also, as for the two symptoms you mentioned, the 1st one is quite normal
since if there is multi copy of same assemlbies in the application's
assembly locating path, there'll occur error.

the 2nd problem about "Incorrect function" seems a bit strange. I'm
thinking whether it is something related to the SourceControl tool? I've
met some issues previously which has the similiar behavior and is caused by
the SourceControl unexpectedly change the assembly or file's name. Have
you tried disconnect the project with SCM system and test separetely?

Thanks,


Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
 
M

murphy

Thanks Steve!

This occurs when I switch to Release configuration and do a build, then
switch back to Debug configuration. Is there any way to tell which
module is mismatched? For the web site, I have both the release and
debug configuration compiling to the same target directory so that
don't need two different virtual directories on my local web server.
Maybe that was a bad idea? However, for a while it did not cause
problems. Also, on the incorrect function issue, I wrote some
diagnostic code and noticed that the url that causes the problem is for
a MS aspx page: '/hos/get_aspx_ver.aspx'. The problem is a winio error
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess
access, FileShare share, Int32 bufferSize, Boolean useAsync, String
msgPath, Boolean bFromProxy)



General Information

IP: 127.0.0.1
Time: 2/28/2005 7:38 PM
Page: /QHOS/login.aspx
Query: ReturnUrl=%2fQHOS%2fget_aspx_ver.aspx
Culture: en-US
UICulture: en-US
Message: Parser Error: Incorrect function.


Exception Information
System.Web.HttpParseException: Parser Error: Incorrect function.
---> System.IO.IOException: Incorrect function.

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, Int32 bufferSize)
at System.IO.StreamReader..ctor(String path, Encoding encoding,
Boolean detectEncodingFromByteOrderMarks, Int32 bufferSize)
at System.Web.UI.Util.ReaderFromFile(String filename, HttpContext
context, String configPath)
at System.Web.UI.TemplateParser.ParseFile(String filename, String
virtualPath)
at System.Web.UI.TemplateParser.Parse()
at
System.Web.UI.TemplateParser.GetParserCacheItemThroughCompilation()
at System.Web.UI.TemplateParser.GetParserCacheItemInternal(Boolean
fCreateIfNotFound)
at
System.Web.UI.TemplateParser.GetParserCacheItemWithNewConfigPath()
at
System.Web.UI.TemplateControlParser.GetReferencedType(TemplateControlParser
parser, String virtualPath)
at System.Web.UI.TemplateControlParser.GetUserControlType(String
virtualPath)
at System.Web.UI.TemplateControlParser.ProcessDirective(String
directiveName, IDictionary directive)
at System.Web.UI.TemplateParser.ParseStringInternal(String text)
at System.Web.UI.TemplateParser.ParseString(String text, String
virtualPath, String basePhysicalDir)
--- End of inner exception stack trace ---
at System.Web.UI.TemplateParser.ParseString(String text, String
virtualPath, String basePhysicalDir)
at System.Web.UI.TemplateParser.ParseFile(String filename, String
virtualPath)
at System.Web.UI.TemplateParser.Parse()
at
System.Web.UI.TemplateParser.GetParserCacheItemThroughCompilation()
at System.Web.UI.TemplateParser.GetParserCacheItemInternal(Boolean
fCreateIfNotFound)
at
System.Web.UI.TemplateParser.GetParserCacheItemWithNewConfigPath()
at System.Web.UI.TemplateParser.GetParserCacheItem()
at
System.Web.UI.TemplateControlParser.CompileAndGetParserCacheItem(String
virtualPath, String inputFile, HttpContext context)
at System.Web.UI.TemplateControlParser.GetCompiledInstance(String
virtualPath, String inputFile, HttpContext context)
at System.Web.UI.PageParser.GetCompiledPageInstanceInternal(String
virtualPath, String inputFile, HttpContext context)
at System.Web.UI.PageHandlerFactory.GetHandler(HttpContext context,
String requestType, String url, String path)
at System.Web.HttpApplication.MapHttpHandler(HttpContext context,
String requestType, String path, String pathTranslated, Boolean
useAppConfig)
at
System.Web.MapHandlerExecutionStep.System.Web.HttpApplication+IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step,
Boolean& completedSynchronously)
 
S

Steven Cheng[MSFT]

Hi Murphy,

Thanks for your followup. You means your application's main assembly's
release and debug version will share the same output location? What about
any other referenced assemblies? I think this is the potential cause of the
problem. Have you tried create a new virutal dir and isolate the release
version assemblies to that new dir , also copy your project to that vdir to
see whether this will work well.

And from some former issues as I mentioned in the previous message, this is
a normal problem when we update the assembly in application's "bin" dir
while the application is running. ( The cached jited dll in asp.net
temporary dir may get out of sync with the code that is requested).
In such situation, we need to restart the IIS and clear the temporary
asp.net folder to overcome it( what you've used currently).

So please make a clean copy of the latest project and the assemblies and
deploy to a new vdir( don't modify any assemblies when the app is running)
to see whether it helps.

Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
 

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

Members online

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top