Form Works Locally, but no on server???

Posted on 2005-04-14
Medium Priority
Last Modified: 2010-04-07
Any idea, why this works locally, as far as the button performing its function, but when I upload to my host, you just keep pushing and pushing the button, and nothing happens.  I included the WebConfig too just in case it may lie in that.

Thanks for the help


    Private Sub btnSubmit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSubmit.Click
        Dim connect As SqlConnection = New SqlConnection
        connect.ConnectionString = "Data Source=???????;" & _
                                    "Initial Catalog=???????;" & _
                                    "UID=????????;" & _

        Dim strSQLInsert As String

        strSQLInsert = "Insert into Members(FirstName,LastName,Company,Address,City,State,Email,Website,Password,SecurityQuestion,SecurityAnswer,MemberStatus) values ("
        strSQLInsert = strSQLInsert & "'" & Trim(txtFirstName.Text) & "',"
        strSQLInsert = strSQLInsert & "'" & Trim(txtLastName.Text) & "',"
        strSQLInsert = strSQLInsert & "'" & Trim(txtCompany.Text) & "',"
        strSQLInsert = strSQLInsert & "'" & Trim(txtAddress.Text) & "',"
        strSQLInsert = strSQLInsert & "'" & Trim(txtCity.Text) & "',"
        strSQLInsert = strSQLInsert & "'" & Trim(txtState.SelectedValue) & "',"
        strSQLInsert = strSQLInsert & "'" & Trim(txtEmail.Text) & "',"
        strSQLInsert = strSQLInsert & "'" & Trim(txtWebsite.Text) & "',"
        strSQLInsert = strSQLInsert & "'" & Trim(txtPassword.Text) & "',"
        strSQLInsert = strSQLInsert & "'" & Trim(txtSecurityQuestion.Text) & "',"
        strSQLInsert = strSQLInsert & "'" & Trim(txtSecurityAnswer.Text) & "',"
        strSQLInsert = strSQLInsert & "'" & Trim(cmbMemberShip.SelectedValue) & "')"

        Dim command1 As New SqlCommand(strSQLInsert, connect)

        Catch ae As SqlException
            connect = Nothing
        End Try

        Dim aCookie As New HttpCookie("MAPPCOOKIE")
        aCookie.Values("FirstName") = txtFirstName.Text
        aCookie.Values("LastName") = txtLastName.Text
        aCookie.Expires = DateTime.Now.AddDays(3)

    End Sub
End Class


=========WEB CONFIG===========

<?xml version="1.0" encoding="utf-8" ?>

          Set compilation debug="true" to insert debugging symbols (.pdb information)
          into the compiled page. Because this creates a larger file that executes
          more slowly, you should set this value to true only when debugging and to
          false at all other times. For more information, refer to the documentation about
          debugging ASP.NET files.
    <compilation defaultLanguage="vb" debug="true" />

          Set customErrors mode="On" or "RemoteOnly" to enable custom error messages, "Off" to disable.
          Add <error> tags for each of the errors you want to handle.

          "On" Always display custom (friendly) messages.
          "Off" Always display detailed ASP.NET error information.
          "RemoteOnly" Display custom (friendly) messages only to users not running
           on the local Web server. This setting is recommended for security purposes, so
           that you do not display application detail information to remote clients.
    <customErrors mode="RemoteOnly" />

          This section sets the authentication policies of the application. Possible modes are "Windows",
          "Forms", "Passport" and "None"

          "None" No authentication is performed.
          "Windows" IIS performs authentication (Basic, Digest, or Integrated Windows) according to
           its settings for the application. Anonymous access must be disabled in IIS.
          "Forms" You provide a custom form (Web page) for users to enter their credentials, and then
           you authenticate them in your application. A user credential token is stored in a cookie.
          "Passport" Authentication is performed via a centralized authentication service provided
           by Microsoft that offers a single logon and core profile services for member sites.
    <authentication mode="Windows" />

          This section sets the authorization policies of the application. You can allow or deny access
          to application resources by user or role. Wildcards: "*" mean everyone, "?" means anonymous
          (unauthenticated) users.
        <allow users="*" /> <!-- Allow all users -->

            <!--  <allow     users="[comma separated list of users]"
                             roles="[comma separated list of roles]"/>
                  <deny      users="[comma separated list of users]"
                             roles="[comma separated list of roles]"/>

          Application-level tracing enables trace log output for every page within an application.
          Set trace enabled="true" to enable application trace logging.  If pageOutput="true", the
          trace information will be displayed at the bottom of each page.  Otherwise, you can view the
          application trace log by browsing the "trace.axd" page from your web application
    <trace enabled="false" requestLimit="10" pageOutput="false" traceMode="SortByTime" localOnly="true" />

          By default ASP.NET uses cookies to identify which requests belong to a particular session.
          If cookies are not available, a session can be tracked by adding a session identifier to the URL.
          To disable cookies, set sessionState cookieless="true".
            sqlConnectionString="data source=;Trusted_Connection=yes"

          This section sets the globalization settings of the application.
    <globalization requestEncoding="utf-8" responseEncoding="utf-8" />

Question by:chrisryhal
  • 5
  • 3
LVL 18

Expert Comment

ID: 13787714
Make sure you are uploading following files:

<bin> directory... [ i think you didnt included this ]

Now, is your directory on the server is configured as Application? ( you can do this from IIS )

Also, check out the .Net Framework installed on your Server is the same as the one you have on your local machine.


Author Comment

ID: 13787736
When I "Copy Project To Web" I tell it to copy ALL files.  The BIN is included.

Looking at other things now

Author Comment

ID: 13787759
I don't have access to their IIS.  I use MaximumASP for my host.  Is there not a way in the WebConfig?
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.


Author Comment

ID: 13787766
Same Framework, and everything was uploaded like you specified
LVL 18

Accepted Solution

tusharashah earned 2000 total points
ID: 13787791
Try to copy "C:\Inetpub\wwwroot\aspnet_client" folder on your root directory on the server...

Also, FYI you dont need to upload .CS file and .ASCX file, as .CS files are compiled in to DLL and ASCX are needed only if you are writing any information in them.

I believe you are gettting this error because Client Scripts are not mapped correctly, there's nothing in Web.COnfig you can do about it.

HTH, -tushar

Author Comment

ID: 13787814
Ok, you are a lifesaver.  The copy worked.  Please explain why I had to do this.  Why is the .NET Framework so weird like this.  I had this problem before with a Windows Application back with VS.NET 2002.
LVL 18

Expert Comment

ID: 13790210
If you check out the .JS file available inside aspnet_client folder you'll have clear idea why would you need them. Some, host do give them and some keep it up to user..

Author Comment

ID: 13790228
I see.  Well, thank you again for your help.  Maybe sometime, you could help me on the Cookie question I have at:


I am pretty proficient with WinApps, but new to ASP.NET.  In fact, I have not really ever had to build websites before, so thought it might be better to stick with something I kinda know, than older ASP.

Thanks Again,

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Lots of people ask this question on how to extend the “MembershipProvider” to make use of custom authentication like using existing database or make use of some other way of authentication. Many blogs show you how to extend the membership provider c…
User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Suggested Courses
Course of the Month14 days, 9 hours left to enroll

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question