简体   繁体   English

上载ASP.NET 3.5网站

[英]Uploading ASP.NET 3.5 website

I have a website writen in ASP.NET and C#. 我有一个用ASP.NET和C#编写的网站。

The site works when run locally, however I don't have any experience with uploading. 该网站在本地运行时可以运行,但是我没有任何上传经验。 Recently I got a free hosting package from somee.com and am currently trying to upload it. 最近,我从somee.com获得了免费的托管程序包,目前正在尝试上传它。

Basically, the pages that don't require database connection work, the ones that do don't. 基本上,不需要数据库连接的页面可以工作,不需要数据库连接的页面可以工作。 So, I've created a database on somee.com and attached my database to that. 因此,我在somee.com上创建了一个数据库,并将数据库附加到该数据库。 I've tested it through somee.com control panel with a couple of querys and it works fine. 我已经通过somee.com控制面板通过几个查询对其进行了测试,并且工作正常。

So I believe the site is uploaded correctly, database works also. 因此,我认为该网站已正确上传,数据库也可以正常工作。 I figure it must be a connection problem. 我认为这一定是连接问题。 In my codebehind, every database connection uses the web.config connection string. 在我的后台代码中,每个数据库连接都使用web.config连接字符串。 I believe there is a problem somewhere in the web.config file, specifically with the connection string. 我相信web.config文件中的某个地方存在问题,尤其是连接字符串。

I have replaced my connection string with the connection string generated by the somee.com control panel which is: 我已经用somee.com控制面板生成的连接字符串替换了我的连接字符串:

<add name="feniks_dbConnectionString"
connectionString="workstation id=SQLEXPRESS003.mssql.somee.com;packet size=4096;user id=*;pwd=*;data source=SQLEXPRESS003.mssql.somee.com;persist security info=False;initial catalog=SQLEXPRESS003"
providerName="System.Data.SqlClient" />

I've marked my id and pass with *. 我已经标记了我的ID,并用*传递了。 I keep getting the same error, you can try it yourself on http://aspsitetest.somee.com/index.aspx . 我一直收到相同的错误,您可以在http://aspsitetest.somee.com/index.aspx上尝试一下。

Error on page not about sql-connect - it writes about wrong web.config 页面上的错误不是关于sql-connect的-它写关于错误的web.config

search for duplicate: 搜索重复项:

There is a duplicate 'system.web.extensions/scripting/scriptResourceHandler' section defined 

If the same web.config works on local machine, maybe you use another version of IIS. 如果在本地计算机上可以使用相同的web.config,则可能使用了其他版本的IIS。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM