After installing VS 2005 on Windows 7, I got this error message when try to run it for the first time
"Visual Studio 2005 SP1 requires an update for Windows Vista"
Solution:
Download SP1 Update here: http://go.microsoft.com/?linkid=6366078 and run the installer in administrator mode.
Tip:
If you are trying to debug web projects, you need to make sure that you go to the Add/Remove Windows Components in Control Panel and install the IIS6 Compatibility with IIS7 option, otherwise you won’t have much luck.
Note:
Tested on Windows 7 Professional 32bit
A blog by an ordinary Linux user who uses Windows in his day job.
Showing posts with label visual studio 2005. Show all posts
Showing posts with label visual studio 2005. Show all posts
Tuesday, February 22, 2011
Wednesday, September 1, 2010
Calling a webservice from javascript in ASP.NET 2.0...
Prerequisite:
In Visual Studio 2005, to make a web project template available, you need to upgrade to SP1. The "other alternative" is to install VS80-KB915364-X86-ENU.exe and WebApplicationProjectSetup.msi. If you choose SP1 than ignore the "alternative" way.
1) For Ajax-Enabled Web Site, install ASP.NET Ajax 1.0.
2) Create new ASP.NET Ajax-Enabled Web Site.
3) Add reference System.Web.Extensions ver 1.0.61025.0.
4) On server side, create new WebService, add System.Web.Script.Services namespace and add ScripService attribute to your webservice class.
Here's the full source code:
MyWebService.asmx.cs
In Visual Studio 2005, to make a web project template available, you need to upgrade to SP1. The "other alternative" is to install VS80-KB915364-X86-ENU.exe and WebApplicationProjectSetup.msi. If you choose SP1 than ignore the "alternative" way.
1) For Ajax-Enabled Web Site, install ASP.NET Ajax 1.0.
2) Create new ASP.NET Ajax-Enabled Web Site.
3) Add reference System.Web.Extensions ver 1.0.61025.0.
4) On server side, create new WebService, add System.Web.Script.Services namespace and add ScripService attribute to your webservice class.
...5) On client side, create new web form and add ScriptManager to the aspx file that pointing to your webservice (MyWebService.asmx).
using System.Web.Script.Services;
...
[ScriptService]
public class MyWebService : WebService
{
public MyWebService()
{
//Uncomment the following line if using designed components
//InitializeComponent();
}
[WebMethod]
public string HelloWorld()
{
return "Hello World";
}
}
...6) Add an html button and its eventhandler.
<asp:ScriptManager ID="ScriptManager1" runat="server">
<Services>
<asp:ServiceReference InlineScript="true" Path="~/MyWebService.asmx" />
</Services>
</asp:ScriptManager>
...
...Done!!! Your first Ajax-Enabled Web Site.
<input id="btnOk" type="button" value="Ok" onclick="javascript:btnOk_Click();" />
...
<script language="javascript" type="text/javascript">
function btnOk_Click()
{
try
{
MyWebService.HelloWorld(OnHelloWorldComplete);
}
catch(e)
{
alert("error " + e);
}
}
function OnHelloWorldComplete(result)
{
alert(result);
}
</script>
Here's the full source code:
MyWebService.asmx.cs
using System;Default.aspx
using System.Web;
using System.Collections;
using System.Web.Services;
using System.Web.Services.Protocols;
using System.Web.Script.Services;
///
/// Summary description for MyWebService
///
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[ScriptService]
public class MyWebService : WebService
{
public MyWebService()
{
//Uncomment the following line if using designed components
//InitializeComponent();
}
[WebMethod]
public string HelloWorld()
{
return "Hello World";
}
}
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<!-- to include webservice proxy, set inlinescript=true, it's much more easier compare to adding script src=webservice.asmx/js -->
<asp:ScriptManager ID="ScriptManager1" runat="server">
<Services>
<asp:ServiceReference InlineScript="true" Path="~/MyWebService.asmx" />
</Services>
</asp:ScriptManager>
<div>
<input id="btnOk" type="button" value="Ok" onclick="javascript:btnOk_Click();" />
</div>
</form>
</body>
</html>
<script language="javascript" type="text/javascript">
function btnOk_Click()
{
try
{
MyWebService.HelloWorld(OnHelloWorldComplete);
}
catch(e)
{
alert("error " + e);
}
}
function OnHelloWorldComplete(result)
{
alert(result);
}
</script>
Thursday, August 26, 2010
Connecting SQL Server 2008 from VS 2005 server explorer...
You need to install Service Pack 1 for Visual Studio 2005. The installer can be obtain from here.
Then install Visual Studio 2005 Update for SQL Server 2008 support.
Done.
Then install Visual Studio 2005 Update for SQL Server 2008 support.
Done.
Subscribe to:
Posts (Atom)