Categories
Career Growth

March 26 – Defy All Challenges: The .NET Developer Roadshow

Microsoft Philippines Event 

March 26 – Defy All Challenges: The .NET Developer Roadshow

SM Megamall Cinema 4

Click on the image for more info

Categories
General

Subscribed to Feedburner which by the way was acquired by Google

I just subscribed to FeedBurner and as you will see, the "Subscribe to My Feed" now points to my feedburner address.

The cool thing with using FeedBurner is you get a lot of functionality out of the box. They have support for a number of readers and I'm sure they will add more. And even delivery thru email.

I don't get much readers (if any at all) but hey incase there will be, FeedBurner will tell me how many subscribers I have and I can even show it here via a script/html.

I haven't known FeedBurner for sometime but I just knew they were acquired by Google. Wow, google has been busy

Categories
.NET

Install .NET Windows Service with Visual Studio Setup Wizard or Project

I've done this a couple of times but I still tend to forget at times so
I might as well post here for me and hopefully someone else's reference.

To create a Windows Service see this article by Ken Getz : Windows Services: New Base Classes in .NET Make Writing a Windows Service Easy

There
are a number of ways to install a windows service, one of which is
using installutil.exe but this post will be using Setup Project which
for me is a little easier to implement: [more]

Was working with VS2005 for this but I think the same things with VS2003 and will update this one for VS2008 soon.

Using SetUp Wizard template
1) open your Windows Service project in VS
2) add a Setup project to your solution

  • File > Add Project > New Project > Setup and Deployment Projects > Setup wizard
  • Set the location appropriate for your situation and click on OK

3) in the Setup wizard, skip page 1.
4) On page 2 (of 5) select "Create a Setup for a Windows application."
5) On page 3, select "Primary output from ."
6) On page 4, click on Finish.
7) The final step (a crucial one) is to add a custom action to run the code in the installer class you added to your project.

  • Right click on the setup project (Solution Explorer)
  • View > Editor > Custom Actions.
  • Right-click on the Install node in the Custom Actions treeview.
  • In the Select Item in Project dialog, make sure Application Folder is selected, and click on OK.
  • Click on OK again to select the "Primary output from " option. You should now see this as a child node of the Install node.

That's
all you have to do. Rebuild both the project and the setup project, run
the installation, and the service should be installed as a Windows
service.

Of course, this scenario doesn't deal with getting the
service started. Even if you've set the ServiceInstaller component's
StartType property to Automatic, you have to reboot the computer to
start the service. (Or, you can use the services.msc applet and start
it yourself.)


——–
Another alternative is to use the Setup Project instead of Setup Wizard.
1) Same as step 1 above
2) add a Setup project to your solution

  • file > Add Project > New Project > Setup and Deployment Projects > Setup Project (rather than Setup Wizard as above)
  • set the location appropriate for your situation and click on OK

3) Right click on the Setup Project (in Solution Explorer)

  • Add > Project Output > Select your Windows Service in the Project dropdown
  • Select Primary Output in the list below it.
  • Click OK

4) The final step (a crucial one) is to add a custom action to run the code in the installer class you added to your project.

  • Right click on the setup project (Solution Explorer)
  • View > Editor > Custom Actions.
  • Right-click on the Install node in the Custom Actions treeview.
  • In the Select Item in Project dialog, make sure Application Folder is selected, and click on OK.
  • Click on OK again to select the "Primary output from " option. You should now see this as a child node of the Install node.

Basically the difference is how the Output was specified to include the "Primary output from .".

Assuming there's nothing wrong with your VS, .NET framework then this should be easy.

Categories
General

My Site’s Performance

This is currently hosted in GoDaddy (yes, you bet it's the price with SQL and AJAX I'd have to say it's a good one).

But either there is just something messy in my setup of BlogEngine.NET or Personal Web Starter Kit or this cheap hosting is really slow. I'm using SQL storage for both applications which is likely faster than file based but it's taking longer than what I expect. I haven't done modifications that could affect performance of the said applications out of the box so I guess it would be the latter.

But well, GoDaddy for now. Move it later when someone actually gets something from these posts Smile

Categories
Web

NO-www vs YES-www

For some time I was wondering why some sites where you access without a WWW redirects you to the one with WWW subdomain.

I
know most of us will agree that accessing with or without the WWW
subdomain should be supported. But in addition to this, I find the
arguments of the no-www side more appealing to me. Of course don't just
take my word and see what you think would fit you. NO-WWWW and YES-WWW and also search the net (google, live search, yahoo) for more info

So that would make my preferred URL for my site become http://ryangaraygay.com (dropping the www but if you still really want to use www, feel free to do so and you'll still access my site)

Categories
.NET

Infragistics NetAdvantage for ASP.NET Issues

Joined infragistics forums in Feb 21 2008 and I already have 5 posts, 3
of which has been unanswered. I've never really been a fan of 3rd party
controls but had to use one for a project. Don't get me wrong, I'm
impressed with the infragistics features in typical usage but it seems
that when combined with ASP.NET ajax and ajax control toolkit it messes
up a little. Then aside from AJAX, I have this issue where binding to
the WebGrid more than once causes a whole lot of side effects.

Below
are links to my posts for reference. If you work with these components
I suggest we take time to read all entries in the forums and be
proactive rather than go through a lot of work and only to discover
there is a known issue for it.

Button in WebTab (async=on) and UpdatePanel fires server side click twice
WebCombo.DataValue returns null on second postback (doesn't persist)
Server Side Event Handler (eg. Button click) doesn't trigger with oEvent.fullPostBack = true
Calling DataBind on a webgrid more than once (not possible?)
Is it possible to change the filter "SelectWhere" from server side code? And How?

Again,
it's been less than a month since I've used the product and I actually
don't a license installed so I don't have design time capabilities (*
license is per developer seat but even without the license the DLL can
be moved over, just no design time capabilities if you have no license
– at least that's how I understood it). But if there's any chance you
run into the same issues and I might have mentioned a work-around
please feel free to drop me a message.

I'll be updating this post should I have additional posts in the forums.

Categories
.NET

ASP.NET HttpRuntime Execution Timeout in debug mode

Been sometime since I've posted something. We'll be moving over to
another company but hopefully when things settle down I'll be able to
post more.

Anyways, while trying to debug a project, I tried to
set the HttpRuntime ExecutionTimeout to a certain value. When a request
reaches the server but takes more than the indicated value to finish
processing return a response to the client (not to be mistaken with the
time it takes from server to browser), it would throw an exception to
the client. I tried to test this by including a
System.Threading.Thread.Sleep(x) in my code and set the execution
timeout to a value less than x.

However for some reason, no
error/exception is thrown. After some research, it turned out that the
[compilation] -> [debug] attribute must be set to false in order for
the execution timeout to take effect

Categories
Data

Problem with SQL Database Mail: ExternalMailQueue missing

UPDATE: Just wanted to point out that it's likely that this issue was after installing .NET Framework 2.0 Service Pack 1 (SP1)

I just updated an entry in the technet forums regarding a previous
issue I've encountered before. I was able to solve my issue by
reinstalling SQL Server (which is not a very brilliant solution) but
since I only have the issue in my development machine, reinstalling was
an option and worked for me.

http://forums.microsoft.com/TechNet/ShowPost.aspx?PostID=2828943&SiteID=17&mode=1

Categories
.NET

Cool Commands addin for Visual Studio

The collapse/expand all project and the open containing folder (plus
other features) would save time/effort so check out this addin from
Gaston Milano. I've tried this out myself for sometime already and
didn't get into any issue so go give it a try.

http://weblogs.asp.net/gmilano/archive/2005/11/10/430240.aspx

Categories
.NET

Viewing email messages sent from .NET code

There are a number of times that we need to test just the content of
the email we send from code. (eg. text and formatting is correct)
without actually needing to send the email.

You can dot this by setting the smtp client's DeliveryMethod property to
SmtpDeliveryMethod.PickupDirectoryFromIis.
Of course this assumes that you use System.Net.Mail.StmpClient. Also,
you'd need IIS installed BUT it's NOT necessarily running/starting.

Without
knowing this, I previously had to use setup my IIS SMTP virtual server
or use a valid stmp host (will fail if the host is invalid) and wait
for the message to arrive at my inbox (which at times takes forever
without me whether there is something wrong with my code or the host).

Furthermore, you free yourself from risk of spamming other people (especially clients) or even yourself.

And of course for mail concerns, the link has always been a great (if not the greatest) resource
http://www.systemnetmail.com/default.aspx