Solved

ASP.net Wake on Lan web app on SBS 2011

Posted on 2014-11-12
2
353 Views
Last Modified: 2014-11-15
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
Comment
Question by:Asif Bacchus
  • 2
2 Comments
 
LVL 6

Author Comment

by:Asif Bacchus
ID: 40444091
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
 
LVL 6

Accepted Solution

by:
Asif Bacchus earned 0 total points
ID: 40444395
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

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article I will describe the Copy Database Wizard method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
Know what services you can and cannot, should and should not combine on your server.
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

808 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question