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

Error on return from function call in ASP.NET "Operation is not supported on this platform."

P: n/a
I am getting the following error on the return from a function call.It
specically happens on the assignment of the return value from the function
call. No error happens inside the function. The function is returning an
Integer with a value of 1.

Err.number =5
Err.Description=Operation is not supported on this platform.
Err.Source=System.Web

Anyone ever seen this error or can explain why I am getting this? Thanks,

Steve M
Sep 17 '08 #1
Share this Question
Share on Google+
1 Reply


P: n/a
I found out what was causing this problem. Not only is the message
misleading, the error is raised way after the fact. see Example below, by
changing the ByRef to ByVal the code works. The example below will have the
URL and the error is raised on the exit of the function. In my opinion the
error should be raised on trying to enter the function so the developer has
some clue as to what is really wrong when debugging.

to recreate the error use this code

Dim RC as integer
RC = TestFunction(Request.ServerVariables("HTTP_HOST"))

Public function TestFunction( ByRef URL as string) as integer
return 1
end function
"news.microsoft.com" <sm******@torchmark.comwrote in message
news:eH*************@TK2MSFTNGP05.phx.gbl...
>I am getting the following error on the return from a function call.It
specically happens on the assignment of the return value from the function
call. No error happens inside the function. The function is returning an
Integer with a value of 1.

Err.number =5
Err.Description=Operation is not supported on this platform.
Err.Source=System.Web

Anyone ever seen this error or can explain why I am getting this? Thanks,

Steve M

Sep 17 '08 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Browse more .NET Framework Questions on Bytes