Solved

ASP.net Wake on Lan web app on SBS 2011

Posted on 2014-11-12
2
326 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
Comment Utility
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
Comment Utility
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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

How to leverage one TLS certificate to encrypt Microsoft SQL traffic and Remote Desktop Services, versus creating multiple tickets for the same server.
Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
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…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

743 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now