i new developer , want develop database website used asp.net using c#. tried connect website sql server database on hosting domain stored web pages , access database properly. however, if want access sql server database on local computer connected internet. how can that? please guide me step step of how this.
here connection string used connect sql server database on hosting domain stored web pages.
<?xml version="1.0"?> <configuration> <connectionstrings> <add name="connectionstring" connectionstring="workstation id=mydocuments.mssql.somee.com;packet size=4096;user id=xxxxxxx;pwd=xxxxxxxxxxxxxxx;data source=mydocuments.mssql.somee.com;persist security info=false;initial catalog=mydocuments"/> </connectionstrings> <system.web> <compilation debug="true" targetframework="4.0"/> </system.web> </configuration>
thanks in advance helps.
in order hosting service access database, computer need public ip address , hosting service need routing computer. that's not possible, if set connection string use ip address host name in place of zeros:
connectionstring="provider=sqloledb;data source=000.000.000.000;initial catalog=yourdbname;uid=******;pwd=******"
google "sql server connection string examples" other examples if don't use ole db
if want way develop using sql database offline instead of hosting service, run iis on pc has sql server , connect using string above hostname localhost
.
Comments
Post a Comment