SQL Server 2008 DbMail Reply To and Display Name

Recently when working with SQL Server and the DBMail option I wanted to setup a generic e-mail account that would fetch the users e- mail address and name for the reply-to.  While the reply-to works while sending an e-mail most people find that the display name of the e-mail address is still whatever is setup in your profile.  To actually change the display name is not supported by the sp_send_dbmail stored procedure.  Kind of annoying.  The e-mail the address that displays is not the one that appears when you click “reply” on your e-mail message.

The Workaround
What I ended up doing to overcome this was adjusted my way of thinking.  I could’ve probably modified a trigger or stored procedure to edit the profile, I could’ve even just written a service in C# and changed the display name and reply-to there (100% works, I’ve done it in the past, build a mail queue and grab the appropriate settings, then send).  Instead this time what I did was created a generic e-mail address account for the company “notifications@company.net” and created a unique profile for them (within the email account and profile setup inside of manage accounts/profiles administration dialog) and set the reply-to the employees e-mail address (within the stored procedure execution).

Not a fix at all but definitely a good workaround in my opinion if the client is ok with this course of action and it’s an easy one time setup, you still get the professionalism with the clients cmpany e-mail name or “spoofed” address appearing and everything works in the end ;)

Final Notes
Again
, although I know this is not an actual fix I do offer it as a valid suggestion proposed as a workaround.

Play Big ;)

Skype Signing In Stuck on Screen

Recently at work the audio/video conferencing took a turn for the worst. After upgrading the software and still having no success of connecting I turned to Google for my reply. The forum I found and the post that I’m referencing as the solution can be found here: http://forum.skype.com/index.php?showtopic=63945.

How did I fix it and get Skype working again? the answer is referenced above but I will repeat it now.  Navigate to C:\Documents and Settings\<<username>>\Application Data\ and delete the “Skype” folder.  After you do so, restart skype and it’ll prompt you for new or existing user credentials all over again.

I can’t guarantee to 100% that this will work for you but it did for me so I thought it deserved a plug.  42 minutes later, finally the executives were able to continue with their meeting….yikes.

Added some theme music

Added some theme music so you have something to listen to while you browse the blog. I added the track using the [ audio http://www.yourdomainhere.com/track.mp3 ] tag using the text/html widget for the side panel. Enjoy!

Windows Live SDK Documentation Frustrating

So recently I’ve been dabbling in the Windows Live SDK’s and the documentation for them.  I’m not one to judge to frequently because I hate writing documentation for stuff, primarily because I wrote it so I know how it works but alas, whenever developing a public API you’re documentation should be thorough and most importantly accurate. While working with the Windows Live SDK documentation I found there are a lot of discrepancies.  For one check out this pages example on acquiring a Windows Live Access Token: http://msdn.microsoft.com/en-us/library/ff750952.aspx and look at the C# example.  Take a strong look at the postData variable and it’s value.  They’re having you submit a querystring (with URL) to the same URL as listed above…Confused?  I was too but what the hey…it’s in the example so I tried it…nope, got no where.  Now look at this page referencing the same procedure: http://msdn.microsoft.com/en-us/library/ff752581.aspx  you’ll notice one of two things.  The code sample at the top and bottom do not match (look at the url you’re submitting the request to).  Lastly, the sample below doesn’t match the first example (notice it doesn’t include the web address {0}?wrap_ etc.etc.etc.  So what the heck?  What you actually have to do is read all of the examples and then try combinations until you get it to function correctly.  The bottom example on: http://msdn.microsoft.com/en-us/library/ff752581.aspx does in fact work for grabbing an AuthToken but why are the other examples wrong?  Somebody at Microsoft should really work on cleaning some of that stuff up for as a big a company as they are.  I realize I’m not perfect and that’s why it’s just my own opinion.

ASP.net Development Server Mozilla and Safari Slow Loading

Alright, so after days of fighting with the issue and testing stuff on multiple browsers I finally decided to Google and find the solution to my problem.  I was shocked at how well it was documented (when it was documented).  So just to clear a few things up.

You say you want Mozilla FireFox to load your asp.net development server pages faster?  Here’s the solution.  Open Mozilla FireFox, in the address bar enter “about:config” click yes to the warning if you get one.  Find thenetwork.dns.disableIPv6 and double click the entry to set it’s value to true. Walaa! FireFox is fixed!  From what I understand there was a bug with the firefox extension and disabling it resolves the issue for your local development.

Now for Safari navigate to your windows hosts file c:\windows\system32\drivers\etc and use notepad or some other text edit program to open your hosts file.  Uncomment or add the line 127.0.0.1 localhost click save.  Walaa, Safari should now load your development pages faster as well.  Nice huh?  After literally days upon days of fighting with the issue it’s finally been resolved on my machine and i look forward to the results of it in the future (big time saver from slloooooooow loaaaadddinnnngg).

Also, your system / browsers may not require these changes as it may only be an issue related to Windows Vista / Windows 7.  From what I understand some XP boxes suffered from it as well.  In any case Googling could’ve helped you solve the issue as well I just thought I’d put the answer to both issues in my post for the sake of convenience.

Happy Coding!

***this post was originally posted at an earlier date on a blog that was self hosted.  Due to the nature of the post and how important I feel that it is since this problem is still very much around I felt the need to transfer it over***

Windows 7 No such class/interface supported.

Our job as web developers is to test our products within the browser standards of that date and time and plan for the future, very poetic eh?  It’s true.  Web developers now-a-days aren’t just HTML coders we actually do a lot more, sure HTML is the foundation for the layout but it’s just scratching the surface when it comes to things that we are responsible for accomplishing.  That being said, some of you (I know I was) probably have been using standalone versions of Internet Explorer for some time.  Windows 7 was no different.  Although I knew Internet Explorer 8 was spidered well into the system I tried to run a standalone IE 7.  Boom.  Encouragement, I got smoked doing so.  Immediately after installing this standalone and then realizing it didn’t work and uninstalling it my computer started giving me the “No such class/interface supported” error for standard operations such as Windows Vista/7 personalization (changing desktop backgrounds, screensavers, resolutions, etc).

Two things at this point.

  1. Putting your windows 7 or vista disk into the cd-rom and performing an upgrade will replace the system files and get you back up and running, you do not need to do a full format so don’t plant yourself between a rock and a hard place because then you’re beautiful rose pedals will not bloom.
  2. IE 8 has the IE 7 mode built into it.  Yessir, you too can run IE7 standards by going into the Developer Tools of Internet Explorer 8 and under the header menu Document Mode (Left single click on it) you can select IE 7 Document.  Way better than some weird 3rd party proprietary POS eh?  Try it, it’s fantastic.

Well now, I hope I’ve helped you clear a few things up.  I know once I read on the Micorosft IE8 blog that you could do the IE7 mode I was most enthusiastic about testing my documents in that mode again.  Not to mention I won’t have to wrestle the “No such class/interface supported” error ever again (yikes, at least I hope not). 

Thanks for reading my blog, damn decent of you.  Schroedman out.

Event ID: 129 Source: nvstor Reset was to \Device\RaidPort0

For like the last month or so my computer has been randomly freezing up for a seconds and then snapping back into action…Needless to say it’s been very frustrating while I’m trying to work but I’ve dealt with it because in the business world time is money and frankly I needed every second devoted to development.  In any case after checking the Windows 7 system event log I noticed that for every occurance of this temporary “lock-up” there was a source error, or warning rather as stated above.  Event ID: 129 Source: nvstor Reset to \Device\RaidPort0. 

After researching this for a bit on the internet I found myself absolutely no where to be honest with you.  It seems everybody has a solution to it, rather it be a firmware update, the hard drive has supposedly “gone bad”, you needed to update your Nvidia drivers, or one gentlemen claimed that kicking his computer fixed the issue.  All offered solutions, possibly all could work in different scenarios, however none worked for me.  I had just built my computer fairly recently and I knew that all of my hardware was good, I also knew that my computer had run fine previously and it seemed overnight the issue had arrived.  I, after trying some of the suggestions found myself backing up my machine hoping the end-all, be-all fix of formatting would get me back to my happy working environment…nope…again, no dice.

I had tried removing the driver, disabling the driver, rolling back fom the Nvidia driver set to the Microsoft driver set and none of these things seemed to work.  The answer came by means of trouble shooting and thinking about the situation.  If it is in fact related to HD Raid Setup then perhaps I should take a look at it.  Bingo!  I did not have my raid setup, so then why was it running raid anything on my system?  I took a look in my bios (CMOS) before windows booted up and went into my hard drive properties.  I ran self checks and everything was fine….Hmmmm….Then I remember something that we had to start doing on laptops at work when trying to install XP because vista (well, let’s not get into that discussion).  In any case I looked at the mode of the hard drive it was set to “RAID”….Typically you’re running IDE or ACHI, RAID was a new one for me since I don’t recall setting it up.  I changed my drive mode to ACHI and am happy to report that the issue does not occur what-so-ever.  So along with the other suggestions that you may end up trying, this is mine… Check your hard drive mode when in you’re in your CMOS (Bios) and make sure that you’re not running some type of weird unfinished, not setup, freaky RAID configuration.

Hope that helps, I know it did me.  Schroedman out.

Sys.WebForms.PageRequestManagerServerErrorException: an unknow error occured while processing the request on the server. the status code returned from the server was: 405

Something I recently came across while developing an application with a partner of mine.   This error occured with a Microsoft AJAX UpdatePanel control while attempting to utilize the pagination methods.  The cause?  A querystring parameter being passed to a URL rewritten address.  The resolution?  I’m going to get to that in a moment.

Project Specs:
Microsoft ASP.NET Ajax Platform
URLRewriter.NET

Initially I tried to solve this situation by utilizing ASP.Net’s RewritePath method but no dice.  What I ended up doing I must admit is my own work around and you may come up with something better and or your own proprietary method.  If you’re further interested then please by all means continue reading…

I tried a few different approaches, one to was to use the RewitePath as previoulsy mentioned another one was to set the form action on page load (which was not successful) and a client side method that I tried was to remove the action attribute from my aspnetForm altogether once the DOM was finished loading.  So what is that I did to get it work?  I’ll tell ya…  I used URLrewrite.NET to point the querystring address to the same exact page but without the querystring….confused?  I know… I forwarded the querystring address to the same exact page as before but without the querystring parameters in the to=”" attribute.  I then used client-side code to fetch the self.location.href (window address) from the browser address bar.  See my short example below if you’re still confused:

<urlrewrite>
   <rewrite from=”/myaddress/action” to=”action-page.aspx” />
   <rewrite from=”/myaddress/action/parameter” to=”action-page.aspx” />
</urlrewrite>

<script type=’text/javascript’>
   if(self.location.href.indexOf(‘/myaddress/action/’) != -1){
      //we are using the parameter, do whatever client side action we wanted to do or trigger an asynchronous postback if necessary.
   }
</script>

That’s it!  Because my method doesn’t require really anything on the server end (or even if it did I could still fetch the address bar location) everything worked out just fine and error is no longer there, why?  because we cleaned up the address and the UpdatePanels are now successfully working again.  Of course there are shortcomings to this solution and I suggest that if this works for you to use it, if not then dismiss it and I bid you good luck in your search.  Schroedman out.