By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
426,060 Members | 1,893 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 426,060 IT Pros & Developers. It's quick & easy.

parser error, incorrect function

P: n/a
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\Tempo rary 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.GetParserCacheItemThr oughCompil*ation()
+74
System.Web.UI.TemplateParser.GetParserCacheItemInt ernal(Bool*ean
fCreateIfNotFound) +189
System.Web.UI.TemplateParser.GetParserCacheItemWit hNewConfig*Path()

+125
System.Web.UI.TemplateParser.GetParserCacheItem() +88
System.Web.UI.TemplateControlParser.CompileAndGetP arserCache*Item(String

virtualPath, String inputFile, HttpContext context) +120
System.Web.UI.TemplateControlParser.GetCompiledIns tance(Stri*ng
virtualPath, String inputFile, HttpContext context) +36
System.Web.UI.PageParser.GetCompiledPageInstanceIn ternal(Str*ing
virtualPath, String inputFile, HttpContext context) +43
System.Web.UI.PageHandlerFactory.GetHandler(HttpCo ntext context,
String requestType, String url, String path) +44
System.Web.HttpApplication.MapHttpHandler(HttpCont ext context,
String requestType, String path, String pathTranslated, Boolean
useAppConfig) +696
System.Web.MapHandlerExecutionStep.System.Web.Http Applicatio*n+IExecutionStep.Execute()

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

completedSynchronously) +173

Nov 19 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
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.)

Nov 19 '05 #2

P: n/a
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.GetParserCacheItemThr oughCompilation()
at System.Web.UI.TemplateParser.GetParserCacheItemInt ernal(Boolean
fCreateIfNotFound)
at
System.Web.UI.TemplateParser.GetParserCacheItemWit hNewConfigPath()
at
System.Web.UI.TemplateControlParser.GetReferencedT ype(TemplateControlParser
parser, String virtualPath)
at System.Web.UI.TemplateControlParser.GetUserControl Type(String
virtualPath)
at System.Web.UI.TemplateControlParser.ProcessDirecti ve(String
directiveName, IDictionary directive)
at System.Web.UI.TemplateParser.ParseStringInternal(S tring 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.GetParserCacheItemThr oughCompilation()
at System.Web.UI.TemplateParser.GetParserCacheItemInt ernal(Boolean
fCreateIfNotFound)
at
System.Web.UI.TemplateParser.GetParserCacheItemWit hNewConfigPath()
at System.Web.UI.TemplateParser.GetParserCacheItem()
at
System.Web.UI.TemplateControlParser.CompileAndGetP arserCacheItem(String
virtualPath, String inputFile, HttpContext context)
at System.Web.UI.TemplateControlParser.GetCompiledIns tance(String
virtualPath, String inputFile, HttpContext context)
at System.Web.UI.PageParser.GetCompiledPageInstanceIn ternal(String
virtualPath, String inputFile, HttpContext context)
at System.Web.UI.PageHandlerFactory.GetHandler(HttpCo ntext context,
String requestType, String url, String path)
at System.Web.HttpApplication.MapHttpHandler(HttpCont ext context,
String requestType, String path, String pathTranslated, Boolean
useAppConfig)
at
System.Web.MapHandlerExecutionStep.System.Web.Http Application+IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionS tep step,
Boolean& completedSynchronously)

Nov 19 '05 #3

P: n/a
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.)

Nov 19 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.