473,396 Members | 1,933 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

deploy asp.net app in godaddy server

7
I have godaddy hosting plan in which multiple domains can be created. In one such domain (not primary) I have hosting my .net app. I am getting error 500
In the web.config file I have included
<system.webServer>
<httpErrors errorMode="Detailed" />
<asp scriptErrorSentToBrowser="true"/>
</system.webServer>
<system.web>
<customErrors mode="Off"/>
<compilation debug="true"/>
</system.web>

this is my web.config file<connectionStrings>
Expand|Select|Wrap|Line Numbers
  1. <add name="conn" connectionString=" Server=xxx.db.xxxx.hostedresource.com; Database=xxx; User ID=xxx; Password=xxx; Trusted_Connection=False" providerName="System.Data.SqlClient" /> <remove name="LocalSqlServer"/> <add name="LocalSqlServer" connectionString=" Server=xxx.db.xxxx.hostedresource.com; Database=xxx; User ID=xxx; Password=xxx; Trusted_Connection=False" providerName="System.Data.SqlClient" />
  2. </connectionStrings> 
  3. <configuration>
  4. <system.webServer>
  5. <httpErrors errorMode="Detailed" />
  6. <asp scriptErrorSentToBrowser="true"/>
  7. </system.webServer>
  8. <system.web>
  9. <customErrors mode="Off"/>
  10. <compilation debug="true"/>
  11. </system.web> 
  12. </configuration>
default.aspx simple regn form
Expand|Select|Wrap|Line Numbers
  1. <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
  2.  
  3. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  4.  
  5. <html xmlns="http://www.w3.org/1999/xhtml" >
  6. <head runat="server">
  7.     <title>Untitled Page</title>
  8. </head>
  9. <body>
  10.     <form id="form1" runat="server">
  11.     <div>
  12.         <table style="position: relative">
  13.             <tr>
  14.                 <td style="width: 100px">
  15.                 </td>
  16.                 <td style="width: 100px">
  17.                 </td>
  18.                 <td style="width: 100px">
  19.                 </td>
  20.             </tr>
  21.             <tr>
  22.                 <td style="width: 100px">
  23.                     <asp:TextBox ID="TextBox1" runat="server" Style="position: relative"></asp:TextBox></td>
  24.                 <td style="width: 100px">
  25.                     <asp:TextBox ID="TextBox2" runat="server" Style="position: relative"></asp:TextBox></td>
  26.                 <td style="width: 100px">
  27.                     <asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Style="position: relative"
  28.                         Text="Button" /></td>
  29.             </tr>
  30.             <tr>
  31.                 <td style="width: 100px">
  32.                 </td>
  33.                 <td style="width: 100px">
  34.                 </td>
  35.                 <td style="width: 100px">
  36.                 </td>
  37.             </tr>
  38.         </table>
  39.  
  40.     </div>
  41.     </form>
  42. </body>
  43. </html>
codebehind
Expand|Select|Wrap|Line Numbers
  1. using System;
  2. using System.Data;
  3. using System.Configuration;
  4. using System.Collections;
  5. using System.Web;
  6. using System.Web.Security;
  7. using System.Web.UI;
  8. using System.Web.UI.WebControls;
  9. using System.Web.UI.WebControls.WebParts;
  10. using System.Web.UI.HtmlControls;
  11. using System.Data.SqlClient;
  12.  
  13.  
  14. public partial class _Default : System.Web.UI.Page
  15. {
  16.     protected void Page_Load(object sender, EventArgs e)
  17.     {
  18.  
  19.     }
  20.     protected void Button1_Click(object sender, EventArgs e)
  21.     {
  22.         string aa = ConfigurationManager.ConnectionStrings["conn"].ConnectionString;
  23.         SqlConnection con = new SqlConnection(aa);
  24.         con.Open();
  25.         string name = TextBox1.Text;
  26.         string pwd = TextBox2.Text;
  27.  
  28.         string str = "insert into login values('" + name + "', '" + pwd + "', '" + pwd + "', '" + pwd + "')";
  29.         SqlCommand cmd = new SqlCommand(str, con);
  30.  
  31.         cmd .ExecuteNonQuery ();
  32.  
  33.  
  34.     }
  35. }
  36.  
Dec 20 '11 #1
2 3470
Could you please advise full error message on the server? Here are steps to publish your web application:

1. Open your project via Visual Studio tool

2. On the Solution Explorer window, right click your project and select "Publish Website"

3. Please publish your website to your local folder, such as C:\Project

4. You will see all the files and subfolders on C:\Project, however, you will not see any code-behind files

5. Please upload whatever you see on C:\Project to the server via FTP

Please note that if your website does not even work on your local PC, it will never ever work on the server. This is why it is important to ensure that your site works on your local PC first

Good luck and hope it helps!
Apr 20 '15 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: hitendra15 | last post by:
How to Deploy SQL server Database to another PC, How to create a package that craetes Database as well as ODBC driver for accessing data at enduser PC, using .Net VB
1
by: Gawelek | last post by:
In order to deploy my server I do the following : regsvcs /fc MyServer.dll gacutil /i MyServer.dll .... and I don't have to know where actually my dll is placed. It is advantage of GAC. But...
2
by: sarvjeet Saini | last post by:
My application is working fine on our local server.We tried on two local servers for testing purpose. But when we host on our main server ,we got the following error: some it work Fine but not...
1
by: AJ | last post by:
Hi All, I am reading a tutorial,that seems to suggest that i can deploy SQL Server based websites without having SQL Server installed on the server. The impression i have is that i can...
5
by: Ted | last post by:
I am working on two versions of an application, one of which will be a windows forms application (which will need to be redistributable) and the other will be a web application. I have MS Visual...
2
by: =?Utf-8?B?cm9kY2hhcg==?= | last post by:
hey all, i have an application i'm deploying to my win2000 server that has the same identical Application variables and session variables (because base on a template sort of) as another...
10
by: =?Utf-8?B?UHVuaXQgS2F1cg==?= | last post by:
Hi, I am developing a windows application in VS.NET 2005. The application is database driven and I need to deploy it on a client's pc. How should I go about developing such an application. I...
2
by: samadams_2006 | last post by:
Hello, I have a problem that I'm hoping someone will be able to help me resolve. 1) I have a C# Web Site in which I connect to the database: "Install Microsoft SQL Server 2005 Express...
3
by: balaki | last post by:
Hi, I am working on a Installer Project, which requires to deploy SQL Server 2005 Reports (.rdl files) and Datasource (.rds file). The datasource is common for all reports. The report files are...
1
vikysaran
by: vikysaran | last post by:
Hello, i'm getting few error on my AJAX enabled application when i'm uploading it to GoDaddy server. Its firsttime I'm using godaddy hosting. can anybody send me web.config file that's working on...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.