jamaicarocks Posted February 27, 2007 CID Share Posted February 27, 2007 Wuz up, I built a SQL database with Godaddy,and also a end user interface using visual basic for new users to enter their name an info and it goes str88 to the Sql Database.......I created a string for it to be linked,I'm however getting a runtime error.Could anyone take a look at the code and also the web.config to see what could be the problem.. Thank you The web.config file <!-- Web.Config Configuration File --> <configuration> <system.web> <customErrors mode="Off"/> </system.web> <appSettings> <add key="conString" value="Server=whsql-v09;UID=etech;PWD=server;Database=DB_136130"> </appSettings> </configuration> The end-user interface I built in VB: <%@ Page Language="VB" ContentType="text/html" ResponseEncoding="iso-8859-1" Debug="true" %> <%@ import Namespace="System.Data" %> <%@ import Namespace="System.Data.SqlClient" %> <script runat="server"> dim username as string dim password as string Dim dr As SqlDataReader Dim dr1 As SqlDataReader dim dbcon as new sqlconnection("Data Source=whsql-v09;Initial Catalog=DB_136130;User Id=etech;Password=server;") dim dt as new DataTable dim dr2 as DataRow dim CallTotal as double Sub btnLogin_Click(sender As Object, e As EventArgs) dim cmd as new SqlCommand dim param as sqlparameter username = txtusername.Text password = txtpassword.Text cmd.CommandText = "spSelectWebMember" cmd.CommandType = CommandType.StoredProcedure cmd.connection = dbcon cmd.Connection.Open() param = New SqlParameter param.ParameterName = "@username" param.SqlDbType = SqlDbType.VarChar param.Value = username cmd.Parameters.Add(param) param = new SqlParameter param.ParameterName = "@password" param.SqlDbType = SqlDbType.VarChar param.size = 50 param.Value = password cmd.Parameters.Add(param) dr = cmd.executereader() if dr.read() then if username = dr.item("username") and password= dr.item("password1") then Session("fname") = dr.item("firstname") Session("lname") = dr.item("lastname") Session("email") = dr.item("email") Session("lphone") = dr.item("username") Session("time") = dr.item("timezone") Session("cust") = dr.item("custID") Session("countryt") = dr.item("country1") Session("user") = dr.item("username") Session("statea") = dr.item("state") Session("pass") = dr.item("password1") 'create session variables cmd.Connection.Close() dim temp as string temp = Session("cust") load2(temp) Response.Redirect("viewhistory1.aspx") end if end if End Sub sub load2(key as string) dim cmd1 as new SqlCommand ' username = txtusername.Text 'password = txtpassword.Text dim sql1 as string sql1 = "select * from customerActivation where custId='"+key+"'" cmd1.CommandText = sql1 cmd1.CommandType = CommandType.Text cmd1.connection = dbcon cmd1.Connection.Open() dr1 = cmd1.executereader() if dr1.read() then Session("jnum")= dr1.item("jamaicaNumbers") Session("pin") = dr1.item("pinNumber") Session("madd") = dr1.item("macAddress") Session("snum") = dr1.item("serialNumber") 'msgbox("d") end if end sub </script> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:asp= "xmlns:asp"> <head> <title>Digital Office Solutions Ltd</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <style type="text/css">.mainborder { BORDER-RIGHT: #666666 thin solid; BORDER-TOP: #666666 thin solid; BORDER-LEFT: #666666 thin solid; BORDER-BOTTOM: #666666 thin solid } .style10 { FONT-SIZE: 12px; FONT-FAMILY: Arial, Helvetica, sans-serif } .style33 { COLOR: #000000 } .style9 { FONT-WEIGHT: bold; FONT-SIZE: 14px; FONT-FAMILY: Arial, Helvetica, sans-serif } .style23 { COLOR: #ff7300 } BODY { BACKGROUND-COLOR: #ffffff } .style28 { FONT-WEIGHT: bold; FONT-SIZE: 36px; COLOR: #ffffff; FONT-FAMILY: Arial, Helvetica, sans-serif } .style37 { FONT-SIZE: smaller; COLOR: #ffffff; FONT-FAMILY: Arial, Helvetica, sans-serif } .style40 { FONT-SIZE: smaller; FONT-FAMILY: Arial, Helvetica, sans-serif } .style41 { FONT-WEIGHT: bold; COLOR: #5db9de } .style42 { COLOR: #5db9de } </style> <script type="text/JavaScript"> <!-- function MM_preloadImages() { //v3.0 var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array(); var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++) if (a.indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a;}} } //--> </script> </head> <body> <form runat="server"> <table width="70%" align="center" border="0"> <tbody> <tr> <td> <table bordercolor="#60bade" width="100%" align="center" border="1"> <tbody> <tr> <td width="90%"> <img height="75" src="images/slogan2.gif" /></td> <td width="30%"> <img height="57" src="images/logo_cw.gif" width="112" /></td> </tr> <tr> <td bgcolor="#5db9de" colspan="2"> <table width="75%" align="center" border="0"> <tbody> <tr> <td width="11%"> <a href="index.html"><img height="24" alt="h" src="images/home.gif" width="100" border="0" /></a></td> <td width="11%"> <a href="product.html"><img height="24" alt="Plans" src="images/plans.gif" width="100" border="0" /></a></td> <td width="11%"> <a href="morefeatures.html"><img height="24" alt="features" src="images/features.gif" width="100" border="0" /></a></td> <td width="11%"> <a href="account.aspx"><img height="24" alt="account" src="images/account.gif" width="100" border="0" /></a></td> <td width="11%"> <a href="comparison.html"><img height="24" alt="compare" src="images/compare.gif" width="100" border="0" /></a></td> <td width="11%"> <img height="24" alt="about" src="images/about.gif" width="100" border="0" /></td> <td width="11%"> <a href="support.html"><img height="24" alt="help" src="images/support.gif" width="122" border="0" /></a></td> <td width="23%"> <a href="mailto:[email protected]"><img height="24" alt="contact" src="images/contact.gif" width="100" border="0" /></a></td> </tr> </tbody> </table> </td> </tr> <tr> <td width="90%"> <img height="117" alt="S" src="images/welcome.jpg" width="100%" align="right" /></td> <td width="30%"> <img height="120" src="images/about.jpg" width="100%" /></td> </tr> <tr> <td> <p class="style41"> Phone Number Format: 555-555-5555 </p> <table width="60%" align="center" border="1"> <tbody> <tr> <td colspan="2"> <div class="style41" align="center">Please Enter Login Information </div> </td> </tr> <tr> <td> <span class="style42">Phone Number </span></td> <td> <asp:TextBox id="txtusername" runat="server"></asp:TextBox> </td> </tr> <tr> <td> <span class="style42">Password</span></td> <td> <asp:TextBox id="txtpassword" runat="server"></asp:TextBox> </td> </tr> <tr> <td colspan="2"> <div align="center"> <asp:Button id="btnLogin" onclick="btnLogin_Click" runat="server" Text="Login"></asp:Button> </div> </td> </tr> <tr> <td colspan="2"> <div align="center"><a href="../../Voip/forgotpw.aspx">Forgot your password? </a> </div> <div class="style4 style6" align="center"><span class="style42">Not Registered?</span> (<a href="signupa.aspx">Register</a>) </div> </td> </tr> </tbody> </table> <p> </p> <p> </p> </td> <td bgcolor="#5db9de"> <table class="mainborder" width="166" align="center" border="0"> <tbody> <tr> <td> <p class="style9" align="center"> Quick Navigate </p> <p class="style10"> <span class="style33">>> <a href="signupa.aspx">SignUp !</a> <br /> >> <a href="troubleshoot.html">Troubleshooting Guide</a> <br /> >> Installation Guide</span> </p> </td> </tr> </tbody> </table> <p> </p> <table class="mainborder" width="166" align="center" border="0"> <tbody> <tr> <td> <p class="style28" align="center"> <span class="style23"></span><a href="signupa.aspx"><img height="100" src="images/SIGN-1.gif" width="174" border="0" /></a> </p> </td> </tr> </tbody> </table> <p> </p> <p> </p> </td> </tr> <tr> <td bgcolor="#5db9de" colspan="2"> <div align="center"><span class="style37">Copyright 2007 D.O.S Ltd. Powered by sardonyxABS</span> </div> </td> </tr> <tr> <td bgcolor="#ffffff" colspan="2"> <div class="style40" align="center"><a href="index.html">Home</a> | <a href="international.html">International Rates</a> | <a href="addon.html">Add-ons</a> | <a href="morefeatures.html">Features</a> | <a href="terms.html">Terms of Use</a> | <a href="help.html">Help</a> | <a href="product.html">Products</a> | <a href="comparison.html">Compare NetSpeak</a> </div> </td> </tr> </tbody> </table> </td> </tr> </tbody> </table> <p> </p> </form> </body> </html> Link to comment Share on other sites More sharing options...
jamaicarocks Posted February 27, 2007 Author CID Share Posted February 27, 2007 The Error Server Error in '/' Application. SEE ERROR HERE----------------http://654kgn21.com/private/Voip/signupa.aspx Link to comment Share on other sites More sharing options...
dlewis23 Posted February 28, 2007 CID Share Posted February 28, 2007 are you sure everything is correct on the godaddy side? Link to comment Share on other sites More sharing options...
jamaicarocks Posted February 28, 2007 Author CID Share Posted February 28, 2007 well actually I will call them and ask,cuz it worked on another servr,but now I change the string to Goddy's server it aint working.. :roll: Link to comment Share on other sites More sharing options...
dlewis23 Posted February 28, 2007 CID Share Posted February 28, 2007 well actually I will call them and ask,cuz it worked on another servr,but now I change the string to Goddy's server it aint working.. :roll: they don't allow external DB connections so if your trying to connect from outside there network then its not going to work. Link to comment Share on other sites More sharing options...
jamaicarocks Posted February 28, 2007 Author CID Share Posted February 28, 2007 hmmmmmmmmmmmmm....thanks fo the info will check into that Link to comment Share on other sites More sharing options...
jamaicarocks Posted February 28, 2007 Author CID Share Posted February 28, 2007 yea ,but come to think of it it's not a external connection,becuz I'm using there hosting plan.........so much for that theory. Link to comment Share on other sites More sharing options...
Recommended Posts