All posts by budigelli

Search for new windows server 2008 host continues

As i mentioned in my previous post, i have signed up with Godaddy.com Basic VPS plan (running Windows server 2003). Even though i was able to run the application with pretty url (using ISAPI ReWrite Lite), i had few issues with the approach.

My biggest concern is the testing! I develop on Vista running IIS7 and to deploy it on Windows Server 2003 running on IIS6 seems to be a big risk. I don’t have any Windows server 2003 machines to set up a stage environment! So, to minimize the potential risk, i am again in the hunt for a hosting provider with Windows Server 2008. I have upped my budget to $70-80 per month.

Continue reading Search for new windows server 2008 host continues

Linq to SQL Database Connection String Issue

As i am moving in to hosting my application on an external server, i am finding some interesting and annoying (time consuming for research) things. i will try to address them as they come along…

One of the main thing was the way i handle my Data Layer. My Data Layer is a class library project and I have separate Business, Entity, and UI layers. My Data Layer is done using LINQ to SQL with stored procedures (All my interaction with Database are using Stored Procedures). When i dragged and dropped required tables and stored procedures in to the designer, behind the scenes, the DBML file, (specifically, the DataContext class) hasa default constructor that stores the connection string. To Re-iterate, we have this connection string defined in Web.Config, and app.Config (gets created for class library projects), and this hard coded value in “.dbml” File.

Continue reading Linq to SQL Database Connection String Issue

Moving from Shared Hosting to VPS

After spending good amount of time on trying to find a hosting provider to host my asp.net MVC application, i have decided to move up to a VPS (Virtual Private Server). It is still running IIS6 on Windows Server 2003 but at least gives me the option of installing a ISAPI rewrite module.

I could not find a decent host with the following requirements for (under)  $50.00

I was looking for

  • Windows Server 2008 (for IIS7)
  • Decent amount of storage (about 5-10 GB)
  • Reasonable Bandwidth (Not sure, but may be around 100-200 GB)
  • SQL Server Space min 1 GB (The most important thing)

Continue reading Moving from Shared Hosting to VPS

Hosting ASP.NET MVC applications

Ok, i have had FUN working with ASP.NET MVC (the official site, more info on Scott Gu’s Blog) Preview 3. I was doing some fun stuff.  Wanting to  play with different technologies of late, i found (really found) ways to use LINQ (to SQL, to XML, and on Entities). To complement all this i have used JQUERY with very good plugins like “Listen” and “SuperFlyDom”.

This whole thing is very cool and works great on my local machine with Vista Ultimate running IIS7. I was excited and wanted to put it on my hosting account only to realize, my hosting account only supports IIS6 (some cheap Shared Hosting, right!). Now, all my pretty looking URL are going to look bad with that “.MVC” extension, right?. After a quick a google search, i found an interesting idea on doing a ReWrites with ISAPI modules. Having done this a lot in my previous jobs, i assumed the job.

My Host, does not support main ISAPI_ReWrite modules, and kind of suggested me to get “LinkFreeze” from the same company. In my excitement to get my website online, i bought that license (about $50.00) and asked my hosting provider to install and let me know how to set up the configuration i needed to do.

Apparently, this is quite different from the main module and is very limited in what it does. I finally figured (or not) that this is not the right software for what i wanted to do.

Now, i am in the HUNT for Web Host.

Either a decent Windows Serer 2008 Shared Host with reasonable SQL Serever Space or a Virtual Dedicated Windows Server 2003 (then i can install SQL Serer Express).

I would appreciate any feed back with your hosting providers. I have had some bad experiences with couple over this last weekend.

(One Provider went on to say that i can install ISAPI_Rewrite module and assured me that all the things i am asking for are already in the package, only for the Tech REP to tell me, after sign-up, that they don’t support it.) Now, i am canceling that account and asking for a refund. Please share your experience.

The solution i am mentioning about hosing ASP.NET MVC apps with pretty URLs on IIS6 are This ONE and This ONE.

Good Luck Hosting with hosting ASP.NET MVC apps. Microsoft, Could you Please provide us some DEV HOSTING PACKAGES for some decent price to play with new technologies. Thanks!!!

Changing Page Title and Meta Tags with Master Pages

Master Pages are good for so many things. They also cause some confusion on how to have a different page title for each page, how to specify Meta Tags, etc.

This post is neither on Master Pages nor on best practices on handling these two topics. I would try to list couple of simple ways to handle them.

Title:

Title tag in Master Page acts as a place holder. On each page that uses Master Page, specify the “Title” in the page declarative.

In your content page, i.e., (.aspx),

<%@ Page Language=”C#” MasterPageFile=”~/Master1.master” AutoEventWireup=”true” Title=”Content Page Title” %>

You could also change the “title” tag in the code file as follows.

base.Master.Page.Header.Title = “Content Page Title”;

Meta Tags:

Meta Tags are little different compared to setting the page Title. Check the code that creates a meta tag “keywords” with content “ASP.NET, AJAX, Web Services”.

HtmlMeta metaTag = new HtmlMeta();

metaTag.Name = “keywords”;

metaTag.Content = “ASP.NET, AJAX, Web Services”;

base.Master.Page.Header.Controls.Add(metaTag);

If you need to do this in multiple content pages, you might want to have a base page with properties like, “MetaKeywords”, “MetaDescription”, “MetaRobots” etc. So, on your regular page you could set these properties.

AJAX UpdatePanel Causes Postback

Little Known Secrete ” UpdatePanel causes Postbacks”.

Even though it is good entry point in to AJAX programming using .NET technologies, UpdatePanel does not give you much performance over traditional PostBack model.

When used, UpdatePanel causes the postback similar to the traditional postback, instantiates the control tree, and at render time realizes to send only the required response (the content in the updatepanel).

So, apart from the reduced response bandwidth and nice looking flicker free UI, updatepanel is not really getting you much performance.

Having said that, i am sure you can get away with UpdatePanel for most of your needs.

I would try to supplement this with more information.

ASP.NET Url Re-writing and Postback Problem Solution

If you are doing any web-applications, chances are you have heard of Search Engine Optimization, also know as SEO. Its all about getting better search engine ranking for your web-pages.

Even though, there are no fixed rules on what to do, there is a general consensus among web masters, on what helps your search engine rankings. And one of them is having a better URL, in other words, having the key words in your URL using URL Re-writing.

The problem with ASP.NET is that once you do URL rewrite, all your post back would stop working. This has been a dis-advantage when it comes to SEO of your pages. There were few tricks we could have done to have it work, but, they are more of a hack than pretty solutions. I have linked to one of those solutions here a while ago.

But, Now with the advent of CSS control adapters, it is not only very easy to URL rewrite and have the postbacks work but also clean [hack!].

Here is a very nice article on various options on URL rewitting from ScottGu’s Blog

All the solutions offered are very clean and i happen to use the CSS control adapter solution on couple of my sandbox projects,

1) An online classified site for my home state, Andhra Pradesh

2) Online Deal and Coupon Aggregation site

-Cheers,

Microsoft Popfly Alpha

I was working on a project and happen to go to the “Start Page” on my Visual Studio and noticed this Microsoft Popfly Alpha under Visual Studio Headlines.

As a technology enthusiasts, I ended up on http://www.popfly.ms and puzzled to see no information on the home page and liked the simple page.

You could Watch the Popfly screencast and it is invite only right now. I have requested for an invitation and waiting for a response. still waiting :)

Any how, it appeared to be cool application and looking forward for playing with it soon. It has a Visual studio plugin with which I hope you could write custom apps to upload to Popfly site.

-Cheers

AJAX Usability Question when the screen is being updated

 

I am working on a simple web application that aggregates RSS from different Online Deal Site in to one place. One of the things I wanted to do was to have one page and load the RSS details in to an Update Panel. I know Update Panel is not the best when it comes to performance but it does its job and with proper caching on the server side, it is very good for my purpose. And more over this blog is not about the merits and/or de-merits of UpdatePanel but on Usability from an end user perspective.

I was using “UpdateProgress” from AJAX control tool kit and it is working very well with simple “update message” while the update panel is being processed. But, there are times when there is not any delay and the “Progress Bar” is not coming up. This may not be the desirable condition as user might not recognize that the screen has new information.

So, I needed some thing more to say that the screen has been updated. I looked in to “UpdatePanelAnimationExtender” to work with the condition. This Extender supports Animations while the screen is being updated and after the update.

 

<cc1:UpdatePanelAnimationExtender ID=”UpdatePanelAnimationExtender1″ runat=”server” EnableViewState=”false” TargetControlID=”UpdatePanel1″>
<Animations>
<OnUpdated>
<Sequence>
<EnableAction Enabled=”true” />
<Color AnimationTarget=”UpdatePanel1″
Duration=”.5″
z-index=”5″
StartValue=”#FFCC99″
EndValue=”#FFFFFF”
Property=”style”
PropertyKey=”backgroundColor” />
</Sequence>
</OnUpdated>
</Animations>
</cc1:UpdatePanelAnimationExtender>

In addition to this I could have another animation to show while the target update panel is being updated with entry like

<OnUpdating>

</OnUpdating>

But I am not sure if this would inform the intended message to the end user! So I have decided to go in-between route. Show the “Progress Bar” while the update panel is being updated and show a simple color transition when the panel is being updated.

To outline the code is looks something like this

<asp:UpdatePanel id=”UpdatePanel1″>

<ContentTemplate>

<asp:UpdateProgress ID=”UpdateProgress1″ runat=”server”>
<ProgressTemplate>
<div class=”ProgressClass”>
Please Wait While the Page is Loading…
</div>
</ProgressTemplate>
</asp:UpdateProgress>

<asp:GridView>

</asp:GridView>

</ContentTemplate>

</asp:UpdatePanel>

<cc1:UpdatePanelAnimationExtender TargetControlID=”UpdatePanel1″>

</cc1:UpdatePanelAnimationExtender>

You could find more about these controls here

-Thanks,