Posts

Donate

Microsoft SQL Server, Error 14234

Lately, I installed an SQL Server 2005 database on my clients server machine,and when i created a database maintenance plan,i got the error as stated: The specified '@subsystem' is invalid (valid values are returned by sp_enum_sqlagent_subsystems). (Microsoft SQL Server, Error 14234) The solution is to install SQL Server 2005 Integration Services.

"Installation Incomplete - The installer was interrupted before could be installed. (Visual Studio Web Setup Project)

Hello! Recently, the ASP.NET Web Forms software i maintained crashed down and can't be opened by the browsers (IE,Firefox and chrome). I tried different kinds of solutions but they don't work. So,i tried the steps below to re-install the web setup package with the error provided as the title of the post. Culprit: virus attack[dangerous or high risk worm/trojan] Solution: 1. Repair windows xp sp2 (using installer cd) XP Repair Install Note: I performed only steps 1-6 2. After repairing, I uninstalled the IIS 3. Delete the current Inetpub folder in Drive C:\ [make sure to backup any files in the Inetpub folder] 4. Then restart PC after performing steps 2-3 5. Re-install IIS using windows xp sp2 cd 6. Register asp.net 2.0 from command prompt c:\windows\microsoft.net\framework\v2.0.50727>aspnet_regiis -i 7. Restart PC/Server 8. Continue Installing VS Web Setup Project Note: This may also apply to Windows 2003 server or new Windows OS.

StringCollections In C#.NET

After some tiresome work, i decided to visit MSDN. Along the way,i manage to take a grip from System.Collections.Specialized StringCollection class. I was used to List , ArrayList, and etc. After reading MSDN's documentation,I managed to create a simple example. class Program { static void Main( string [] args) { //defined class StringCollections collections = new StringCollections(); //.NET collection class StringCollection netcollection = new StringCollection(); string [] names = new string [5]; //insert five elements for ( int i = 0; i <5; i++) { names[i] = "nelson" + (i+1); } //store to stringcollection object netcollection = collections.Employees(names); //navigate collection class StringEnumerator enumerator = netcollection.GetEnumerator(); while (enumerator.MoveNext()) {...

ASP.NET MVC View Model

I recently read an article from Stephen Walther on View Models and gave it a spin. In this example,i created two typed class namely People and address..You may create properties or public fields in there. After that,create a controller with the view model which has List properties. Then in your view,you simply inherit the PersonViewModel. Below is the Person Controller with the PersonViewModel. public class PersonController : Controller { public ActionResult Index() { // Create list of People var people = new List<People>(); people.Add( new People(30, "Nelson G." )); people.Add( new People(28, "James Ingram" )); // Create list of Address var address = new List<Address>(); address.Add( new Address(9000, "Cebu" )); address.Add( new Address(6521, "Baybay" )); // Return view return View( new PersonVi...

Accessing HttpUtility Class In C# Winforms

To use or access the HttpUtility class in C# winforms, do the following: 1. Add reference to System.Web dll 2. Use any methods available in HttpUtility class. System.Web.HttpUtility.HtmlDecode(mystring); System.Web.HttpUtility.UrlDecode(mystring); Cheers!

Using Sessions In ASP.NET Web Forms Web Services

Lately, i was confronted with a problem on managing state with web services, after reading a book on XML in .NET 2.0, i found a tip on creating and consuming web services with state capabilities. I followed this link: Using Session State in a Webservice MSDN: Web Service Session This idea, is a life saver to some of my web projects.. :D

Visual C# 2010 Express (System.Web Namespace Not Found)

When you created a winforms project and you would like to use HttpUtilities or other classes found on System.Web, you might notice that when you tried adding reference to System.Web, it is not found on the .NET Tab. By default, the project is targeted on .NET Compact framework 4.0, so just change it to .NET Framework 4.0. By then,you will be able to add the System.Web namespace in your projects. Cheers

Repair A SQL Server 2008 Suspect Database After Upgrading

Lately, I've installed SQL Server 2008 Developer Edition in my pc and migrated all sql server 2005 databases. Upon attaching/restoring all databases, some were marked as suspect. Below is the sql script to repair those databases. EXEC sp_resetstatus 'Test' ; ALTER DATABASE Test SET EMERGENCY DBCC checkdb( 'Test' ) ALTER DATABASE Test SET SINGLE_USER WITH ROLLBACK IMMEDIATE DBCC CheckDB ( 'Test' , REPAIR_ALLOW_DATA_LOSS) ALTER DATABASE Test SET MULTI_USER But as a precautionary measure,I have back-up plans for each database,as to have another copy when things go wrong. Test is the database name. Source: how-to-repair-sql-server-2008-suspect

Deploying ASP.NET Web Forms Websites Using ASP.NET Membership Framework

In my case, i have been experimenting an e-commerce application which uses asp.net membership framework. If I run the website using visual studio 2008, it successfully logs in using the users i have created using the built-in asp.net website administration tool. However, if you deploy this on a production server such as IIS, you cant' log-in. The solution is straightforward in this link: Always set the "applicationName" property when configuring ASP.NET 2.0 Membership and other Providers(Configuring ASP.NET 2.0 Membership)

How To Clear Sessions After Logout Button Is Clicked In ASP.NET Web Forms

Solution I found is on this link: ASP.NET Forum Link

Donate