Just a quick update, I did notice in the web.config for lansweeper that when it defines the connection string, it updated the IP of the server to the correct IP but it looks like it left the username and password as some default values. Notice the user ID is "lansweeperuser" and password is "mysecretpassword1*". None of that is what I specified during install. Here's my web.config...
<configuration>
<appSettings>
<add key="MM_CONNECTION_HANDLER_Lansweeper" value="sqlserver.htm"/>
<add key="MM_CONNECTION_STRING_Lansweeper" value="Persist Security Info=False;Data Source=10.0.0.74;Initial Catalog=lansweeperdb;User ID=lansweeperuser;Password=mysecretpassword0*;Connect Timeout=120"/>
<add key="MM_CONNECTION_DATABASETYPE_Lansweeper" value="SQLServer"/><add key="MM_CONNECTION_SCHEMA_Lansweeper" value=""/>
<add key="MM_CONNECTION_CATALOG_Lansweeper" value=""/>
<add key="dateformat" value="dd/MM/yyyy"/>
</appSettings>
<system.web>
<compilation debug="false" strict="false" explicit="true">
<assemblies><add assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
<add assembly="System.Web.Extensions.Design, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add assembly="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
</assemblies>
</compilation>
<httpHandlers>
<remove verb="*" path="*.asmx"/>
<add verb="*" path="*.asmx" type="System.Web.Script.Services.ScriptHandlerFactory" validate="false"/>
<add verb="*" path="*_AppService.axd" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/>
<add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/>
</httpHandlers>
<httpModules>
<add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
</httpModules>
</system.web>
</configuration>
Even after correcting the UserID and Password information for the database connection, I still get the following error:
Server Error in '/lansweeper' Application.
--------------------------------------------------------------------------------
Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: BC30560: 'ScriptServiceAttribute' is ambiguous in the namespace 'System.Web.Script.Services'.
Source Error:
Line 8: <WebServiceBinding(ConformsTo:=WsiProfiles.BasicProfile1_1)> _
Line 9: <Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Line 10: <Script.Services.ScriptService()> _
Line 11: Public Class Lansweeper
Line 12: Inherits System.Web.Services.WebService
Source File: C:\Program Files\lansweeper\website\App_Code\Lansweeper.vb Line: 10
Show Detailed Compiler Output:
c:\windows\system32\inetsrv> "c:\WINDOWS\Microsoft.NET\Framework\v3.5\vbc.exe" /t:library /utf8output /R:"C:\WINDOWS\assembly\GAC_MSIL\System.Design\2.0.0.0__b03f5f7f11d50a3a\System.Design.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.Runtime.Serialization\3.0.0.0__b77a5c561934e089\System.Runtime.Serialization.dll" /R:"C:\WINDOWS\assembly\GAC_32\System.EnterpriseServices\2.0.0.0__b03f5f7f11d50a3a\System.EnterpriseServices.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.Core\3.5.0.0__b77a5c561934e089\System.Core.dll" /R:"c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\lansweeper\25c7b012\417d6b11\assembly\dl3\2c363094\00185dc5_dd3cc701\System.Web.Extensions.Design.DLL" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.Web.Services\2.0.0.0__b03f5f7f11d50a3a\System.Web.Services.dll" /R:"c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\lansweeper\25c7b012\417d6b11\assembly\dl3\2b414687\00eef237_9fadc501\DreamweaverCtrls.DLL" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.Web.Extensions\3.5.0.0__31bf3856ad364e35\System.Web.Extensions.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.Xml.Linq\3.5.0.0__b77a5c561934e089\System.Xml.Linq.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.Data.DataSetExtensions\3.5.0.0__b77a5c561934e089\System.Data.DataSetExtensions.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System\2.0.0.0__b77a5c561934e089\System.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.Xml\2.0.0.0__b77a5c561934e089\System.Xml.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.Web.Mobile\2.0.0.0__b03f5f7f11d50a3a\System.Web.Mobile.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.WorkflowServices\3.5.0.0__31bf3856ad364e35\System.WorkflowServices.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.ServiceModel\3.0.0.0__b77a5c561934e089\System.ServiceModel.dll" /R:"c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\lansweeper\25c7b012\417d6b11\assembly\dl3\bb4915e5\00f463a3_079cc801\AjaxControlToolkit.DLL" /R:"C:\WINDOWS\assembly\GAC_32\System.Web\2.0.0.0__b03f5f7f11d50a3a\System.Web.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.Windows.Forms\2.0.0.0__b77a5c561934e089\System.Windows.Forms.dll" /R:"C:\WINDOWS\assembly\GAC_32\System.Data\2.0.0.0__b77a5c561934e089\System.Data.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.IdentityModel\3.0.0.0__b77a5c561934e089\System.IdentityModel.dll" /R:"c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\lansweeper\25c7b012\417d6b11\assembly\dl3\6df7334e\00185dc5_dd3cc701\System.Web.Extensions.DLL" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.ServiceModel.Web\3.5.0.0__31bf3856ad364e35\System.ServiceModel.Web.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.Configuration\2.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.Web.Extensions.Design\3.5.0.0__31bf3856ad364e35\System.Web.Extensions.Design.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.Drawing\2.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll" /R:"c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\lansweeper\25c7b012\417d6b11\assembly\dl3\642be787\00747e3d_6880c701\Thumbimage.DLL" /out:"c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\lansweeper\25c7b012\417d6b11\App_Code.koxe0cgm.dll" /debug- /define:_MYTYPE=\"Web\" /imports:Microsoft.VisualBasic,System,System.Collections,System.Collections.Specialized,System.Configuration,System.Text,System.Text.RegularExpressions,System.Web,System.Web.Caching,System.Web.SessionState,System.Web.Security,System.Web.Profile,System.Web.UI,System.Web.UI.WebControls,System.Web.UI.WebControls.WebParts,System.Web.UI.HtmlControls /warnaserror- /optionInfer+ "c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\lansweeper\25c7b012\417d6b11\App_Code.koxe0cgm.0.vb" "c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\lansweeper\25c7b012\417d6b11\App_Code.koxe0cgm.1.vb"
Microsoft (R) Visual Basic Compiler version 9.0.30729.1
Copyright (c) Microsoft Corporation. All rights reserved.
C:\Program Files\lansweeper\website\App_Code\Lansweeper.vb(10) : error BC30560: 'ScriptServiceAttribute' is ambiguous in the namespace 'System.Web.Script.Services'.
<Script.Services.ScriptService()> _
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:\Program Files\lansweeper\website\App_Code\Lansweeper.vb(15) : error BC30560: 'ScriptMethodAttribute' is ambiguous in the namespace 'System.Web.Script.Services'.
<Script.Services.ScriptMethod()> _
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:\Program Files\lansweeper\website\App_Code\Lansweeper.vb(44) : error BC30560: 'ScriptMethodAttribute' is ambiguous in the namespace 'System.Web.Script.Services'.
<Script.Services.ScriptMethod()> _
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:\Program Files\lansweeper\website\App_Code\Lansweeper.vb(73) : error BC30560: 'ScriptMethodAttribute' is ambiguous in the namespace 'System.Web.Script.Services'.
<Script.Services.ScriptMethod()> _
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Show Complete Compilation Source:
Line 1: Imports System.Web
Line 2: Imports System.Web.Services
Line 3: Imports System.Web.Services.Protocols
Line 4: Imports System.Data.SqlClient
Line 5: Imports System.Data
Line 6:
Line 7: <WebService(Namespace:="http://tempuri.org/")> _
Line 8: <WebServiceBinding(ConformsTo:=WsiProfiles.BasicProfile1_1)> _
Line 9: <Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Line 10: <Script.Services.ScriptService()> _
Line 11: Public Class Lansweeper
Line 12: Inherits System.Web.Services.WebService
Line 13:
Line 14: <WebMethod()> _
Line 15: <Script.Services.ScriptMethod()> _
Line 16: Public Function GetComputerList(ByVal prefixText As String, ByVal count As Integer) As String()
Line 17: If count = 0 Then
Line 18: count = 10
Line 19: End If
Line 20:
Line 21: Dim conn As New SqlConnection(ConfigurationManager.AppSettings("MM_CONNECTION_STRING_Lansweeper").ToString)
Line 22: Dim dt As DataTable = New DataTable()
Line 23: Dim da As SqlDataAdapter = New SqlDataAdapter()
Line 24: Dim comm As New SqlCommand()
Line 25:
Line 26: conn.Open()
Line 27: comm.CommandText = "web30ajaxcomp"
Line 28: comm.CommandType = CommandType.StoredProcedure
Line 29: comm.Parameters.Add("@comp", SqlDbType.VarChar).Value = prefixText
Line 30: comm.Connection = conn
Line 31: da.SelectCommand = comm
Line 32: da.Fill(dt)
Line 33: conn.Close()
Line 34:
Line 35: Dim result(dt.Rows.Count - 1) As String
Line 36: count = dt.Rows.Count
Line 37: For i As Integer = 0 To dt.Rows.Count - 1
Line 38: result(i) = dt.Rows(i)("Computer").ToString() + "~" + dt.Rows(i)("ComputerImage").ToString()
Line 39: Next
Line 40: Return result
Line 41: End Function
Line 42:
Line 43: <WebMethod()> _
Line 44: <Script.Services.ScriptMethod()> _
Line 45: Public Function GetUserList(ByVal prefixText As String, ByVal count As Integer) As String()
Line 46: If count = 0 Then
Line 47: count = 10
Line 48: End If
Line 49:
Line 50: Dim conn As New SqlConnection(ConfigurationManager.AppSettings("MM_CONNECTION_STRING_Lansweeper").ToString)
Line 51: Dim dt As DataTable = New DataTable()
Line 52: Dim da As SqlDataAdapter = New SqlDataAdapter()
Line 53: Dim comm As New SqlCommand()
Line 54:
Line 55: conn.Open()
Line 56: comm.CommandText = "web30ajaxuser"
Line 57: comm.CommandType = CommandType.StoredProcedure
Line 58: comm.Parameters.Add("@name", SqlDbType.VarChar).Value = prefixText
Line 59: comm.Connection = conn
Line 60: da.SelectCommand = comm
Line 61: da.Fill(dt)
Line 62: conn.Close()
Line 63:
Line 64: Dim result(dt.Rows.Count - 1) As String
Line 65: count = dt.Rows.Count
Line 66: For i As Integer = 0 To dt.Rows.Count - 1
Line 67: result(i) = dt.Rows(i)("Displayname").ToString() + "~" + dt.Rows(i)("UserImage").ToString()
Line 68: Next
Line 69: Return result
Line 70: End Function
Line 71:
Line 72: <WebMethod()> _
Line 73: <Script.Services.ScriptMethod()> _
Line 74: Public Function GetSoftwareList(ByVal prefixText As String, ByVal count As Integer) As String()
Line 75: If count = 0 Then
Line 76: count = 10
Line 77: End If
Line 78:
Line 79: Dim conn As New SqlConnection(ConfigurationManager.AppSettings("MM_CONNECTION_STRING_Lansweeper").ToString)
Line 80: Dim dt As DataTable = New DataTable()
Line 81: Dim da As SqlDataAdapter = New SqlDataAdapter()
Line 82: Dim comm As New SqlCommand()
Line 83:
Line 84: conn.Open()
Line 85: comm.CommandText = "web30ajaxsoftware"
Line 86: comm.CommandType = CommandType.StoredProcedure
Line 87: comm.Parameters.Add("@soft", SqlDbType.VarChar).Value = prefixText
Line 88: comm.Connection = conn
Line 89: da.SelectCommand = comm
Line 90: da.Fill(dt)
Line 91: conn.Close()
Line 92:
Line 93: Dim result(dt.Rows.Count - 1) As String
Line 94: count = dt.Rows.Count
Line 95: For i As Integer = 0 To dt.Rows.Count - 1
Line 96: result(i) = dt.Rows(i)("softwareName").ToString() + "~" + dt.Rows(i)("softwareImage").ToString()
Line 97: Next
Line 98: Return result
Line 99: End Function
Line 100:
Line 101: End Class
Line 102: