This is a really important questions and I would be grateful if anyone can help me.
A developer had developed a service for me which runs in Windows Server. It communicates with sql server database and passes the data to client application. The client application run on windows and communicates with server database using that service. The person had developed two programs coded in C#. One was service which is configured and installed in server and other is a dll that winforms applications uses to get data and perform other functions.
Currently the who setup is working fine. A windows server (2008 R2) is running with SQL Server 2012 (Express). It also has IIS and the service is configured. This is what is present/configured:
Inetpub folder has a folder where service files are present. It has bin folder with dll file and root folder has wcf service file (svc) and web.config file.
IIS has the service configured in application pool and sites
SQL Server is running and SQL Server Management Studio is also installed
The server configuration etc was done by the developer few years ago. Now I wish to shift to another server. So I am trying to configure this in another Windows server (this time Windows Server 2016) and am using Sql Server 2016.
Inspite of me trying to configure the server the same way it is doing in older server (which is running ok) the program is unable to communicate with the new server. I have checked the IIS config, have imported the database in the new server, create users and matched setting. The web config file was tweaked to match new server name. The firewall has port opened. But still it is not working.
I wonder what I am missing or have not yet configured. For e.g. the program uses a port e.g. 1670 and firewall has this port opened but I have not registered this port in new server for WCF. Is this the issue or what? The IIS setting is all done as they match with old server IIS settings.
Please help me in anyway you can. Even when I am trying to run the program locally (on server) to test it, it gives error (network error). The old server (orig) however is working fine.
Thank you.
The problem was solved after I enabled mixed mode authentication in SQL Server. :)
Related
I have a client-server application written in c#. I am hoping someone can give some direction on where to look in order to set it up where a user could connect to the server from their workstation, most likely through http but that's not a requirement, and download the client. The mechanism would need the following features:
Check for updates on client startup and automatically apply them.
Allow multiple clients (connected to different servers) to download on the same machine
Client can be downloaded by a non-local admin
Possibly install any prerequisites needed on the workstation
I currently use ClickOnce but it isn't quite working out. Currently the server sits in IIS and uses WCF services.
We have a requirement (I believe as part of a post build/deployment verification test (BVT)) to test that remote server A can "connect" to remote server B.
I want to develop a console application using C# on my LOCAL developer VM. This should then "connect" to remote server A. It then needs to check that remote server A can "connect" to remote server B (via the original connection from LOCAL to remote server A).
Currently I have generated a simple "helper" exe that connects to remote server B (using a prior known connection string point to remote server B and SqlConnection classes). The exe is copied to remote server A as part of the build process (at the end). PSEXEC.exe on the build server then remotely starts the "helper" exe on remote server A and checks the %errorcode%. This then determines if the BVT should pass or fail (Then the "helper" exe is then deleted from remote server A).
FYI all machines run Windows Server 2008 R2 x64 Enterprise and are on the same local domain. I am an administrator on all 3 machines.
Remote server A is a web server and remote server B is a SQL database server. The LOCAL machine will/does represent the build server. This test is simple as saying "can the web server connect to the database server". The difficulty is how to do that remotely.
I know I can just do System/integration/end-to-end testing (using Coded UI etc) and we are doing this but want to consider this requirement/test as well (as the servers and network configuration etc are a "shared responsibility" with an external party and we cant guarantee that anything has/will change without our knowledge (other than reacting via Service Desk processes))
The process I have adopted seems OTT but does appear to work (if I close ports etc). Is there a completely .NET way of doing it using TCPCLient classess or something etc? What about doing webservices and hosting them on the webserver and call them from the build server? Other ideas and things to consider more than welcome.
Why not create a test page on the web server that carries out an innocuous operation against the SQL server.
The page might execute a simple query (select top(1) name from person) for example.
I can see web-services tagged in your question. If you want to verify connectivity to a server hosting web services or between a server hosting web services and an underlying back-end server (database for example), the best way to be sure (in my opinion) would be to call an innocuous service that does a simple read. Retrieving WSDLs would not be enough.
You can use Management objects to query and control computers and servers on your domain.
http://msdn.microsoft.com/en-us/library/system.management.aspx
SQL server includes some extra objects specific to managing SQL Server.
http://msdn.microsoft.com/en-us/library/ms220749.aspx
If you have Linqpad:
ManagedComputer mc = new ManagedComputer( "yourserver" );
mc.Dump();
otherwise create a console app and create an instance of ManagedComputer and use the debugger to query the computer's SQL server, to see the sort of information available.
As you can see its a big subject...
I need to write on a share path (In different server) from my web server. I try this by impersonationg a network account which has access to write on that server. When I try this by running from my Visual Studio it works. But when I publish it in the IIS of the web server and it does't work.
can some one provide some insight.?
I have hosted a web application(Application is in Asp.Net with C# language and Sql server database). Now i want to store data in my local database from my hosted web application.How will be the database connection string...any addition changes in Sql Server..?Please explain..Any reply will be appreciated..
DeEP
from .NET 2 upwards the connection string can be stored in a specific node of the web.config file and not in appSettings as it was done before.
I am not sure about your question because if you try to access a database server located outside the network where you have deployed your ASP.NET application (so the hosting provider's internal network), it won't probably work, even in case your SQL Server is publicly available and open for connections from outside (which is bad, really, really bad...), it would also depend on the hosting company network settings.
How did you connect to the SQL Server during development and for debugging within the development machine?
There are info on how to connect to a SQL Server with a connection string in the web.config here: Using connection strings from web.config in ASP.NET v2.0 but not sure this solves your issue.
Sounds like you need to speak to your network administrator - I'd guess that your firewall will probably be set up stop any attempt to access it from outside of your network.
If your hosting company allow it, you maybe able to set up a VPN between the web server and your local database but this would be a lot of hassle.
I have a web app which connects to a remote sql server over the internet. It accesses via an alias which is configured with the alias name, hostname, port and TCP/IP as the protocol
I can access the db fine from sql mgt studio and from my app when running with the built in web server (cassini) in visual studio 2008.
I have now installed IIS (win7 64bit) and pointed it at the app. when i run the aplication in visual studio, but configured to connect to the local iis, i get the named pipes provider error 40 message. my iis is running as localsystem - but so is IIS on a collauges pc that works just fine. he claims to have done no special configuration.
i don't understand why. identical code. identical connection string. etc. I've disabled my firewall, no avail.
but it works for my colleague - he appears to have the same configuration that i do. i am stumped. does anyone have any ideas?
my sql client configuration now has only tcp/ip enabled.
any help is greatly appreciated.
are you using integrated security by chance? Casinni I beleieve will be using your user when it connects to SQL, however your local IIS 7 will be using the Application Pool identity, which by default your SQL Server won't allow to connect. You can set your app pool to run as Network Service and then see if can connect.
If you aren't using integrated security this would require more thought.
As a total side have you tried using IIS Express? Just as this is the full power of IIS but runs as the current user, which would again help determine if its a user account permission issue.