Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 490
  • Last Modified:

ASP.net Wake on Lan web app on SBS 2011

I am trying to install the ASP.NET WOL web app (http://wol.codeplex.com/) as referenced in various technet articles.  The idea is to make a webpage that will allow users to wake up their computers so they can access them via remote desktop.  However, I'm getting tripped up with the SQL aspects.

To create the database using the provided script, I am running the following SQL command.

SqlCmd -S . -E -i c:\inetpub\wwwroot\WakeOnLan\App_Data\Schema.sql

Open in new window


This as I understand it (I don't know much about SQL), should create a new database on SERVER\WakeOnLan and allow for integrated authentication.

The problem is that at the end of the script I get the following error:

A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified) (.Net SqlClient Data Provider)

I get the same error if I try to open the named instance via SQL Management Studio.  Under server name, the named instance shows up, but it does not show up in my list of registered servers and does not show up in SQL Server Configuration.  The script has correctly created a new path in my SQL database folder, but the binn folder is empty.

If you need any further information, please let me know.  I'm a complete novice at SQL.  Any help is greatly appreciated.

I have attached the Schema.sql file for reference.

Thanks in advance.
Schema.sql
0
Asif Bacchus
Asked:
Asif Bacchus
  • 2
1 Solution
 
Asif BacchusAuthor Commented:
Figured it out.  The problem was that the script doesn't create a named instance of it's own and doesn't setup the proper access via SQL for the DefaultAppPool user.  I will post a step-by-step soon to this site for others should they be interested.
0
 
Asif BacchusAuthor Commented:
The instructions on the download site for the ASP.net program/web-app are incomplete as is the installation program, at least when working with SQL Server 2008 or newer (Full OR Express) as opposed to older versions of SQL Express.

The basic outline to install this program and get it working are as follows:
1.   Create a new named instance using the SQL Installation Centre.
2.   Edit the included Web.Config file:
         a.   Use the connection string meant for full SQL installations as opposed to the old deprecated SQL Express string.        
         b.   Correct the connection string and point it to the named instance.
3.   Edit the included Schema.sql script to reference 'WakeOnLan'
4.   Run the edited Schema.sql file against the new new named instance to create the necessary DB.
5.   Add the IIS_IUSRS group to the database as per the included user guide.
6.   Convert the program folder to an application via IIS and specify it should use the DefaultAppPool.

I have created a step-by-step illustrated tutorial on my blog at http://mytechiethoughts.wordpress.com/2014/11/15/asp-net-wake-on-lan-on-server-2008/

I hope this helps anyone that has been struggling to get this very useful tool working.
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now