Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New Coder
    Join Date
    Jan 2010
    Location
    Montreal
    Posts
    32
    Thanks
    2
    Thanked 0 Times in 0 Posts

    issue converting to ASP.NET framework 4.0

    Hi!

    I've been asked in my work place to complete a transition from ASP to ASP.NET. I am new to ASP.NET so this may very well be something simple that I just had no idea about. In either case, thanks for even looking at this.

    Ok, that said, as mentioned, most of the reports we offer are in ASP but we had some existing reports in ASP.NET (2 of them more specifically).

    So far what i've done is to first install the latest framework (4) on my system. From there, the issues began. The 2 application that use to run on my localhost no longer run.

    To be as specific as I can, note that these 2 applications work just fine if I revert back to the 2.0 framework.

    I get the following error message:

    Code:
    Overload resolution failed because no accessible 'parameters' accepts this number of arguments.
    
    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.MissingMemberException: Overload resolution failed because no accessible 'parameters' accepts this number of arguments.
    
    Source Error: 
    
    Line 68: 	cmd.parameters.Add(New OleDbParameter())
    Line 69: 	cmd.parameters.Add(New OleDbParameter())
    Line 70: 	cmd.parameters(0).Value = "LOGON"
    Line 71: 	cmd.parameters(1).Value = session("lan_id")
    Line 72: 	cmd.parameters(2).Value = Session("SQLSession")
     
    Source File: D:\zzzz_localdev\auth\basic.aspx    Line: 70
    I made a search on google for "New OleDbParameter" since I am unfamiliar with it and most of what I came accross had OleDbParameter() with the parameter being passed. Am I wrong to see this as the issue since the values for each parameters are precised afterword (as shown in line 70 and onwards)? (maybe there is a change from 2.0 to 4.0 which prevents the format of these statements of being used?)

    Thanks in advance!

    Fab
    Last edited by FabriceB; 01-11-2011 at 09:13 PM.

  • #2
    Regular Coder
    Join Date
    Dec 2007
    Posts
    137
    Thanks
    1
    Thanked 21 Times in 21 Posts
    Just looking at the MSDN for OleDbParameter, it doesn't look it changed from 2.0 and 4.0.

    4.0
    http://msdn.microsoft.com/en-us/libr...parameter.aspx

    2.0
    http://msdn.microsoft.com/en-us/libr...(v=VS.80).aspx

    Does it work on ASP.NET 3.5?

    You could also try asking on the ASP.NET forums. If you find an answer, post back as I'm curious, too.

  • #3
    New Coder
    Join Date
    Jan 2010
    Location
    Montreal
    Posts
    32
    Thanks
    2
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by pigpen View Post
    Does it work on ASP.NET 3.5?
    Good question!

    I made the jump directly to 4! I'll try it out a little later and keep you posted. I also posted this up on MSDN' .Net forum so we'll see if I get any answers!

    Thanks for the help!

  • #4
    New Coder
    Join Date
    Jan 2010
    Location
    Montreal
    Posts
    32
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Resolved: issue converting to ASP.NET framework 4.0

    Quote Originally Posted by pigpen View Post
    If you find an answer, post back as I'm curious, too.
    so here is what seems to have worked for me:

    Code:
    	cmd.Parameters.Add(New OleDbParameter())
    	cmd.Parameters.Add(New OleDbParameter())
    	cmd.Parameters.Add(New OleDbParameter())
    	cmd.Parameters.item(0).Value = "LOGON"
    	cmd.Parameters.item(1).Value = Session("lan_id")
    	cmd.Parameters.item(2).Value = Session("SQLSession")
    It still doesn't tell me why the previous didn't work but at this point, I need to move forward and catch up on the rest of the task!

    thanks for the help!

  • #5
    New Coder
    Join Date
    Jan 2010
    Location
    Montreal
    Posts
    32
    Thanks
    2
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Creativesystem View Post
    can u tell me why these error came

    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".

    <!-- Web.Config Configuration File -->

    <configuration>
    <system.web>
    <customErrors mode="Off"/>
    </system.web>
    </configuration>


    Notes: The current error page you are seeing can be replaced by a custom error page by modifying the "defaultRedirect" attribute of the application's <customErrors> configuration tag to point to a custom error page URL.

    <!-- Web.Config Configuration File -->

    <configuration>
    <system.web>
    <customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/>
    </system.web>
    </configuration>

    Have you found the answer to your question?

    If not, for one you would be better off making your own thread, for two you may need to give more details...


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •