Praveen's profileUniverse of a DeveloperPhotosBlogListsMore Tools Help

Universe of a Developer

Share - Learn - Innovate - Benefit

Search

Loading...

Windows Live Translator Gadget

Loading...

Questions I've Asked

This user currently is not registered with Windows Live QnA account. Click here to learn more and get started.

Questions I've Answered

This user currently is not registered with Windows Live QnA account. Click here to learn more and get started.

Wassup!

 

Please wait...
Sorry, the comment you entered is too long. Please shorten it.
You didn't enter anything. Please try again.
Sorry, we can't add your comment right now. Please try again later.
To add a comment, you need permission from your parent. Ask for permission
Your parent has turned off comments.
Sorry, we can't delete your comment right now. Please try again later.
You've exceeded the maximum number of comments that can be left in one day. Please try again in 24 hours.
Your account has had the ability to leave comments disabled because our systems indicate that you may be spamming other users. If you believe that your account has been disabled in error please contact Windows Live support.
Complete the security check below to finish leaving your comment.
The characters you type in the security check must match the characters in the picture or audio.
Jacobytewrote:
The Thistle - National Emblem of Scotland
The Saltire of Scotland Go to Jacobyte's Spaces The Lion Rampant is the flag used historically by the King of Scots.
 
Deutsch  Fran?ais  Espa?ol  Portugu?s  Italiano  Nederlands  ????? Arabic  ?? Chinese
 
Failte!  Greetings!
Many thanx for being friends.
Yours aye!  Wink
Jacobyte.
Celtic art is ornamental, avoiding straight lines and only occasionally using symmetry, without the imitation of nature or ideal of beauty central to the classical tradition, but as far as we can understand it often involves complex symbolism.
Click here to go to Jacobyte's Spaces To go to Jacobyte's Spaces
 
web hit counter 
July 22
August 28

IE 8 beta 2 - methods of "window.external" object throws exception

 

Update 15 Dec, 2008: This issue disappeared in IE8 partner build ('Pre-RC1') 8.0.6001.18343

In continuation to the post about IE 8 beta 1 issue, I figured that I still have the problem in my system even after upgrading to IE 8 beta 2. Only this time, I was able to generalize the problem very much.

Here’s what I found:

The problem is that window.external object (in JavaScript) doesn’t seem to have the correct reference to one of browser object (or at least that’s what I think so). Hence all methods of this object throws me an runtime script error.

Because of this, following actions fail in IE 8 beta 2 for me

  1. Opening New tab – the previous post
    Though this doesn’t happen every time, but when it happens the code breaks at
    window.external.BuildNewTabPage(); 
  2. Adding Service (Search provider, accelerators, etc) from http://www.ieaddons.com/en/searchproviders/
    breaks at
    window.external.AddSearchProvider();
    or
    window.external.addService(); 
  3. The very first time, I open IE 8 beta 2 or the once after I 'reset' settings and open the browser again, in the 'Customize Search providers' & 'Customize Accelerators' page.
  4. Especially in the 'Add Search Provider' page, in the section 'Create Your Own', when I add a custom search, it throws me an error "Unable to add search provider. The Create Your Own tool requires Internet Explorer. [32811]". See screenshot 3 below.

My UserAgent

I thought probably my UserAgent string is corrupt, but here it is… and I don’t see any problem with this.

“Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; InfoPath.1; 
.NET CLR 2.0.50727; FDM; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)”

Screenshots:

(1) IE 8 beta 2 - Strange error 1  This screenshot is taken in the IE Gallery web site with error pop up from the site & the ‘About Dialog’. This is just a consequence the the problem I mentioned above, that window.external is not having correct reference. See code in below screenshot to understand.

(2) IE8b2_error_debug_new2  This screenshot shows the exception details & the point were the exception is thrown in the IE Gallery website. The error number is “-2147319765”. A quick search on the web lead to nowhere.

(3) IE8b2_error_custom_search This happens in the ‘Add Search Provider’ –> Create Your Own search provider section. It’s strange that it says that I need IE to run this. smile_sad

Seeking help at the IE Forum

I’m (again) going to post the problem in IE forum and this time I hope to see a different answer. The solution given to my previous post didn’t work at all.

Update: The issue is posted in IE Forum here.

Does anybody experience same issue in your system? Comment back…

Beautify the web with this post! Share it! :

July 30

Streaming File Download fails/error over SSL (HTTPS) – Issue & Solution

 

For a long time (quite a long time for an issue of such small size) in my project, we had this issue: file downloaded over SSL connection fails with strange error. After hunting in various woods (read articles) in several planets (read web sites), I found that solution was nowhere to be found easily but it was available as part of the application already.  smile_sarcastic 

 

Here's the scenario:

    The application is written in ASP.NET/ C# 2.0 and it runs over SSL (HTTPS) in production. User is allowed to upload a file in a certain module in the application (say, Profile -> Options page). A link in the home page of every user is the provision to download this file. That is all - no big fuzz in the implementation as such.
    There are other few environmental setups which influenced this particular issue to slip till the production release smile_regular The development environment was not using SSL certificates for obvious reasons; I mean who would want to set up a certificate for a dev environment? (It turned out, at least in QA environment it helps when the exact production settings are simulated - this is one more thing we overlook.)


File Download Issue:

When the application moved to QA environment, there were two types of errors experienced. The scenario goes like this: The user clicks on the link (to download the file) one of the following might occur

  1. IE throws an error “Internet Explorer cannot download ABC.XYZ from www.mycompany.com” and does not even download the file

    doc download3
    The error message being "Internet explorer cannot download file from site. Internet explorer was not able to open this Internet site. ..."

  2. IE shows the ‘Open/ Save’ dialog
    1. When ‘Open’ is clicked, the file opens in the appropriate editor (say Adobe Acrobat reader) and shows ‘File not found error’
      On inspection (using Sysinternals FileMon tools), we found that file is deleted by the IE browser as soon the ‘open’ button is clicked on the dialog. This is not the case in FF browsers
    2. When ‘Save’ is clicked, things go smooth as expected.

The issue #2 was not seen lately, so I didn't give it a priority. I'll talk about how issue #1 was solved below.

‘Code’ Behind:

Here are few details about the application...

  1. Application is based on ASP.NET/C# 2.0 deployed on WinServer2003/HTTPS (Production/ QA environment). We use normal FileUpload control in ASP.NET for uploading the file.
  2. The uploaded file is stored in the database in ‘Image’ type field of one of the tables. Database is run on SQL Server 2000
  3. On click of the link to download, the file is read from the database and streamed to the HTTP Response using appropriate headers (see attached code: entity class and utility class)

Initial Research:

The initial research didn’t lead to any place meaningful – couple of support KBs, few forums, and couple of blogs – but nothing seemed to give correct solution. smile_omg Here are the links that I ended up in the initial search!

I did find something interesting – that too in our intranet projects portal’s FAQ section – which again didn’t direct me to any solution but gave few reasons why it was a browser issue and few links which ‘proved’ that it wasn’t anything to do with code. (All these actually convinced me that there nothing we could do to solve this smile_sad)

Understanding how the wheel works and extend it to my issue:

I really wanted to do a ‘root cause analysis’ for this issue as it was bothering me for a significant time, I knew there is one another similar feature wherein the application throws up the PDF file to the user in the ‘Open/ Save’ dialog.

When I found how it was implemented, I was surprised and shocked! lightbulb – surprised because it was lying all along in the space place much near to what I was looking for and shocked because this particular way to implementing the feature was hidden due to the fact that the faulty code which I’ve been working on lately was an initial (aka 1st release) implementation which now has surpassed about 8+ releases.

So I didn’t even imagine doubting the component code that was supposed to achieve the expected behavior (it failed to do anyway) – and all these took some quite a humongous amount of effort – which I feel should not have been wasted given that one another working solution for similar problem is there in the application already! Well, whatever, we got what we wanted – scrutiny later. smile_shades

Solution:

The solution itself is very simple (at least in our case).

  1. There should a temporary location which the website can access with RW permissions
  2. Create a virtual directory (in case of Win server 2003, create within the website) and make it point to the temporary location. Let’s call this ‘\tmpFolder’
  3. Create a HTTP Handler class (inheriting IHttpHandler) you can refer to this KB
  4. In <system.web> section of config file, add httpHandlers, like the given below
  <system.web>
    <!-- This is used for File Download -->
    <httpHandlers>
      <add verb="*" path="FileRetrieveHandler.aspx" 
           type="MyNameSpace.FileHandler, MyNameAssembly"/>
    </httpHandlers>
    <!-- ... Rest of System.Web section -->
  </system.web>
  1. When you to open the file to the Response stream, do the following instead of directly writing to the Response stream
    1. Write the file to the temp location
    2. Redirect the response to the custom http handler by passing the filename also
  1. I’m sure this could be optimized for performance and security, but I keep it open for comments! J

Okay, the main focus here should the use of HTTP handler. The reason why temp folder was used, in my case, is that similar solution was already implemented in the application. So instead of steps 1 and 2, one could even choose to read the file inside the HTTP handler or use a wrapper that do the job as you wish!

Couple of more issues noticed:

When the file being downloaded has some specifics characteristics, different browsers behave differently – this was also quite interesting… For e.g. lets take the file name as "My F#& # .pdf"

  1. In IE 7 (or IE 8 b1), the white space is replaced with underscore. Ref this.
    1. In our case the filename in open/ save dialog becomes 'My_F_&___.pdf'
    2. This cannot be fixed – (rather, shall not be! Since there is no correct solution and is by design in IE7 and IE8 beta1)
  2. In FF, the final downloaded file name was just “My” – the part of file before the first white space. FF forum blames IE for not implementing prescribed international standard. Read this.
    1. We’ll follow the standard mentioned in RFC 2231 of IETF, as recommended by FF forum, which works pretty fine in any situation on any browser! smile_regular

I’ve submitted this to IE forums here, let’s see what happens next!

Few things learned in the course of finding the solution:

  1. How to install, configure and issue a SSL certificate and configure website to use HTTPS - from here
  2. Detailed look up on HTTP Handlers and different ways to implement/ enforce file download

More comments and critics welcome!

 

 

Beautify the web! Share this :

 

July 08

Adding/ Trapping 'Return key' hook to input text box

Even though invention of mighty 'mouse' has revolutionized the our computer usage, still we are used to lot of typing - it's not that we like it, we have no other choice (say like 'speaking to the computer', at least not in mainstream).

Often we come across either one of these dialog boxes in the web very frequently: Search box, Log in box. When we do use keyboard to input values to those text boxes, we tend to hit 'enter' (the 'return' key) which is accepted as if you clicked the 'Go' or 'Log in' or 'Sign in' or similar kind of button available just beneath the text box where you were typing. Such buttons are called 'default buttons' and the actual action of hitting the enter key takes.

Most of the times this doesn't have to be a problem for a web developer - the behaviour that "when  'enter' key is pressed, the event for 'default' button should be activated". when you just mention one particular button to be 'default' for the page, all such 'enter' key actions will be taken as the default button being clicked.

Well, all seems to work fine, but you wonder why am I writing this? If you look closer, the 'default' button that you could mention only one default for a page, yes! So, imagine a page with a search box, log in box, couple of others (or imagine a dashboard or home page with lot of sections) each having their own 'default' buttons. That's the kind of situation one will have to do something more to make the 'default' button work for each section and only for that section correctly.

In general, this can be achieved by adding  a 'key hook' to the text box, commanding the browser to do something our way whenever enter key is hit from the text box.This is made feasible with help of JavaScript.

Here's an article on how to fix this thing!
June 23

IE8 beta 1 - Opening new tab throws 'Element not found' error (solution)

Well, today I tried to reinstall IE8 b1 in my winxp sp2 system and could solve this particular issue yet.
Let me take you through a little flashback...
Sequence of events (installations) that happened in my machine during last few months... Angel
  1. Installed IE7 on winxp sp2 (upgraded from default IE6)
  2. Installed IE8b1
  3. Uninstalled IE8b1, IE7 (reverted to default IE6)
  4. Installed IE8b1 (directly from IE6 to IE8b1)
Okay, now the real problem, whenever I open a new tab in IE8 b1, I get this strange error...  Crying

"A Runtime error has occured. Do you wish to debug?
Line 55
Element not found"
(See screenshot)
IE 8 beta 1 'Element not found' Error


When I tried to debug with VS 2005, the error was navigated to in res:ieframe.dll/tabswelcome.htmSick
Line 55
           <body .... onload="window.external.BuildNewTabPage(); ....
(see screenshot)
IE 8 beta 1 'Element not found' VS Debug

Little search on "window.external.BuildNewTabPage()" lead me only to a page in the MSDN library over here and that too was not helpful Disappointed. At least for now, I'm guessing an upgrade path from IE6 to IE7 to IE8 beta 1 would solve this issue. But, I guess I don't have time to try that immediately! Confused

As of now, I couldn't find any solution myself and there is not yet any available on the internet or the communities as well!

I've put it up in the IE 8 communities myself, let see if any good response comes up.Smile

Update: Got the solution for this Thanks to 'rob^_^',
It seems I need to do an 'IE Reset'
  Tools>Internet Options, Advanced tab, Reset IE button.

But I get to another set of problems Sad. Here's the thread.

June 19

Some SQL Query problems solved today

Today in my project, we were confronted with a unique problem in SQL.
We had a table with design much like the one on the right. 
Table: CustomerFields

There were actually two problems we had to work out:
1. How to find if the selected Customers have same number of fields?
In general terms, How to find if the values of the field in the selected query are all same?


When we explain with data: Fig (a) & (c) are True condition, Fig (b) & (d) are False condition
For demonstration purposes, the CustomerID field is assumed as a char field so that I can reference the Customers directly.
[Photo is also attached at end of the post]
CustomerFields table sample data

The query we ended up finally like this....

-- Count of Fields

SELECT COUNT(FieldGroups) DiffGroupsCnt FROM (

      SELECT COUNT(FieldCnt) FieldGroups  FROM (

            SELECT COUNT(a.FieldID) FieldCnt, a.CustomerID FROM CustomerFields a

            WHERE a.CUSTOMERID IN ( A , B , C , D )

            GROUP BY a.CustomerID

            ) CustFieldGroups

      GROUP BY FieldCnt

) DifferenceGroups 


2. How to find if all the selected Customers have same field setup?
i.e. They should have same number of fields (which is achieved by the above solution) and also the fields tied up to each customer should also be same.
In general terms, How to find if the list of values of particular field is exactly same among all the specified class or group of values.

Figs: with sample data: For this problem,  Fig (a) & (c) are True condition, Fig (b) & (d) are False condition.
[Photo is also attached at end of the post]
CustomerFields table - sample data

For this, we were able to pickup a solution something VERY much similar to the solution for problem 1. Surprised

-- Field Setup

SELECT COUNT(FieldGroups) DiffGroupsCnt FROM (

      SELECT COUNT(CntOfCust) FieldGroups  FROM (

            SELECT COUNT(a.CustomerID) CntOfCust, a.FieldID FROM CustomerFields a

            WHERE a.CUSTOMERID IN ( 21, 22 , 11 )

            GROUP BY a.FieldID

            ) CustFieldGroups

      GROUP BY CntOfCust

) DifferenceGroups

It was real fun to do something challenging!
If you have read carefully, you might have noticed that the order of the fields itself is not taken into consideration. Let see who can come up with query for such a scenario Smile

May 17

Have you forgot something..? ASP.NET Peformance Tips

Before anyone starts the development process in the web application projects, I feel they should definitely have a look at this...

http://samples.gotdotnet.com/quickstart/aspplus/doc/perftuning.aspx

The article starts with

             Any programming model has its common performance pitfalls, and ASP.NET is no exception…

Now making them better or worse is in the hands of the project team as a whole, but developers in particular.


Having these in our mind will not only increase the performance of the web application but also help us,

  • develop a robust development environment during design time
  • understand adapt best practices
  • overall, become a better web developer

Just thought it would be useful to revisit our basics on web development!

May 02

Dynamic Language Runtime (CLR to DLR)

 
 
Ever since .NET came up, the dynamic languages (scripting languages like VBScript in ASP) were moved to more robust 'compiled' code model (JIT compiled in VB.NET and C#). This certainly gave significant advantage for the developers. What the developers lost here was more flexible dynamic way of writing powerful scripts, which was traded off for other benefits provided by .NET.
 
But, there was always a thirst for these scripting languages. You should have known that IronPython (Project) was under development, which is .NET version of the Python language. and, here it is... at MIX'07 Microsoft announced support for scripting languages in .NET which will run on 'Dynamic Language Runtime' (DLR).
 
Well we know CLR. But this DLR??? 
 
More details are at Jim Hugunin's blog
 
March 29

Sharepoint Designer 2007 Demo

Microsoft has some demonstrations of the Sharepoint Designer in the Office online.

Demos: A six-part series on getting the most out of SharePoint Designer 2007

  1. Powerful user interface and design tools
  2. Customize SharePoint sites
  3. Create and modify layout pages
  4. Create and modify rules-based workflow applications
  5. Build composite no-code SharePoint applications
    Visual Studio integration

Microsoft SharePoint Designer Team Blog is a great source of information too.

Digg!

NewsUpdate: BizTalk Server 2006 Documentation in PDF Format

Microsoft BizTalk Team has published an update to the BizTalk Server 2006 core documentation PDF here. Here are some of the juicy details:

  • The PDF is in a self-extracting zip and weighs in at about 55 megs.
  • When extracted, the PDF is about 120 megs.
  • The PDF contains almost 20,000 pages.
  • Links are highlighted in blue but are not active. Enabling links is a potential future enhancement.
  • Searching a document this size takes time.

Again, this is a single PDF file containing all of the BizTalk Server documentation. If you prefer a more granular approach, please post your thoughts.

 

Digg!

March 24

Invalid ViewState error - a rare case scenario

 
Alright! It's another ASP.NET 2.0 blog. Recently I got a query with a set of exception details logged in to database of a web site which went live few weeks back. The main focus was with two type of exceptions Invalid length for a Base-64 char array. and Invalid character in a Base-64 string.
 
It contained few of lines similar to

1129     0          -1         Information                    2007-03-22 19:11:43.377            <server_name>            <some_application_domain>      4716     c:\windows\system32\inetsrv\w3wp.exe   NULL    5900            Invalid length for a Base-64 char array. -   Timestamp: 3/22/2007 7:11:43 PM  Message: Invalid length for a Base-64 char array. -   Category: <some_category>  Priority: -1  EventId: 0  Severity: <some_severity>  Title:  Machine: <some_machine> Application Domain: <some_application_domain>  Process Id: 4716  Process Name: c:\windows\system32\inetsrv\w3wp.exe  Win32 Thread Id: 5900  Thread Name:   Extended Properties: Username - Unauthenticated  StrackTrace -   Source -   InnerExceptionStackTrace -    at System.Convert.FromBase64String(String s)    at System.Web.UI.ObjectStateFormatter.Deserialize(String inputString)    at System.Web.UI.ObjectStateFormatter.System.Web.UI.IStateFormatter.Deserialize(String serializedState)    at System.Web.UI.Util.DeserializeWithAssert(IStateFormatter formatter, String serializedState)    at System.Web.UI.HiddenFieldPageStatePersister.Load()  InnerExceptionSource - mscorlib 

As the title says, the exception was due to 'Invalid View State'. Here's the summary of the response that was fired from my inbox quite after I received this query.
 
Possible Reasons: 
This problem may occur in any of the following scenarios
  1. When some kind of encryptions (for eg: text for passwords) are used and  that are basically stored as Base-64 types (data type to stored special encoded string). Each Base-64 types are actually made of 3 bytes. Hence when processing these type of data, when it’s not in multiples of 3, such exceptions occur. 
  2.  The ViewState is also stored in encoded Base-64 format. Another possible victim for this exception.

Resolving the problem reported…:

*Anyway, with the limited amount of exception details that was being mentioned, it’s clear that the exception occurred due to some loss/ truncation in the stored View State information.
(Because the stack trace information starts from the method “System.Web.UI.HiddenFieldPageStatePersister.Load()” which is nothing but the method used to load the ViewState (during Post back) from the HTML.) 
>> Though this does not seem to be exception of type “Invalid_Viewstate_Client_Disconnected” – which actually occurs when the ViewState is corrupt during post back from client, we can’t avoid this option either.
      • The exception details given are not actually sufficient to find the exact point of problem (like IP, User-Agent (browser used), view state itself, path of the requested page).  Now, there is a Hot Fix available, to enhance the amount of exception details logged. (This does not fix any problems though )

 Possible scenarios which would have caused this problem:

  1. The ViewState of the page is too long for the page to hold (limited by the MaxHTTPRequest length specified in web.config) and the view state gets truncated in transit. But this will be less probable since the web site had the MaxHTTPRequest length to 10MB citing some huge file uploads.
    1. Anyway, You can try to slightly lessen this with ViewState Compression techniques. Implementing this is fairly simple.
  2. In a page where there are significant amount of ViewState stored (for eg: Pages with drop down having huge amount of data which you can’t avoid), the user tried to click the button more than once, causing multiple request to be fired and even this would have truncated the View State that’s being posted back to the server.
  3. Another worst possible case would be some one trying to hack into by tampering the view state of your web page 

Exception handling?

And, one more thing! This kind of exception can not be gracefully caught in a try-catch block inside the page, because it is triggered by ASP.NET when ever it finds the ViewState seems to be tampered during transit and happens before even executing the web page’s Page_Load event.

Ok, finally…:

>> Hence, Scenario Case 1 can be controlled only to a limit (the limit you set as maximum HTTP Request size). Case 2 can not be controlled the web site host and Case 3, no way!  Don't worry, it doesn't matter.
>> If possible, give a thought to the Hot Fix mentioned, to log more details if it's already not installed. And, make sure u log all the exception details recursively.

 -- EOM --

Any better methods/ fixes available? 

 

  Digg!

March 14

After a [loooong] break!

        After quite a long time, I sincerely thought I should continue blogging, for the good cause. The reason that kept me away from blogging was very simple to guess - yes, i was getting interested in yet another unexplored area of web programming.
 
        So, back with a bang. Here's a small story of what made me to take a leap into web programming and why i wasn't so before the times.
 
        Long ago, not soo long ago,.. Ok fine! About 8 months back, when I too joined as a developer in a consultancy, I thought I wasn't at the right place, actually I wasn't. All I wanted was to revolutionise the way people do programming. I had to lay my plans on this. First step under stand the past! This happened when I was working on a COM based project, which basically was a DTS kind of Excel to database conversion project. Lot was there to be learnt.
 
        Soon after I was invited for a challenging (technically, but not that much in a business prospective) task in another project, which had to be designed from scratch. I liked software process and design always, which made me refine my skills on that for a while. Then, it turned out to be a web based project. Initial days, I was little skeptical about the way web programming was taking shape. Talk about Ajax and other stuff. Though there was alpha and beta frameworks for Ajax, I had to firs master the 2.0 thingy. (of course, it's ASP.NET 2.0).
 
        I happen to learn things that actually were best practices. Some of the those are listed:
1. SOA 
        Whenever you think of web, you feel "connected", but actually the underlying architecture is "disconnected"  and thus, "connect with any thing". This is the best advantage of a service oriented architecture. Almost all the web programming languages allow the developers to realize 'em.
2. Framework
        It's become a rule now! You need to have a "framework" to start developing any application, which will define
    • The way methods are called
    • The way and process of storing temporary objects (cache and session objects)
    • Common functionality for the application (eg: authorization for all the pages, mailing component, etc.)
    • Performance based tweaks (like ViewState compression, huge data load on client, etc.)
3. Proper Coding Standards
        This will become the back bone for a developer. I really don't want to start another gyan on this. As developers you know what is a make and a break in your application. But funny thing is, you *will* have to know what will break or make, when you handle some one else's code. That's were coding standards come in to help. From naming a local variable to defining the signature for your web service.
4. Value Addition
        Some time you will have to be in the line of end-users and think in their shoes. Because, no body else can tell what you exactly want ;)
5. Fun
        Yeah! You read it right. Dedicating 10% of your time for fun will make you feel as if you are always enjoying the time.
6. Better Tools and Management
        After all, you need to do things quick and right. One of the best Visual Studio is there. When you do really do deeds, you will take up ownership of modules, projects, etc. "Together with power comes responsibility". :D
 
Ok! It was a wonderful journey through developing and learning. I'll share more about this later. Lets see how the web [programming] spreads out in the future.
 
After all these, I am still passionate on the basics; basics of what brought us to this level of programming! Lets see.
 
 
October 17

DotNET-U (Start learning .NET 3.0 from .NET University)

 
        Just came across this intertesting site, that is also resourceful enough. Ever wondered how you will start with a new technology? rather the future technology?
 
        Alright, here the deal! Let's talk about .NET 3.0! (Yes, the next generation highly sophisticated yet simple way of developing Win and Web Apps.) Hopefully, you should have read about this somewhere in my blog posts previously! But here's much more to read on... This site called .NET University started by some of the MVPs provides with good technical overview of the new features of .NET 3.0.
 
       As per the courseware, this site has the coolest powerpoint slides covering all the basics of the pillars of .NET 3.0, covering the WPF, WCF, WF and WCS - the pillars of .NET 3.0 (previously, WinFX).
 
       Microsoft already has a extensive resource for all these piled up at www.netfx3.com. But even making it simpler and much more cool, this dotnet-u provides "Microsoft class" powerpoint files. The content is good for any starter, who is ready to rock with the most anticipated technology ever! Fortunately. This comes handy for sharing my experience on .NEt 3.0 with my friends now.
 
Guess you too will find it easy to start learning!
October 12

Projecting the project to the next level!

 
            It was already 2 AM in the morning! While this guy as fell asleep in my bed, I was
trying to list down the tasks done/ pending and planned for the my project. I thought of taking
a break. Break as in, try to see how the Office 2007 B2 TR (Technical Refresh) that I
installed recently looks like.
 
            Now a days I almost forgot to use my sidebar regularly. I casually started the application
which started screeching for each RSS feed available in the links that I use. I guess, I had to
publish the XSD document now available. I thought it'll nice to skim through SQL Stored
Procedure basics before I kick start on the design. Talking about layers, I remembered
installing Enterprise Library June 2005 sometime back, but I need the newer Jan 2006 version(for
.NET 2.0). Next stop -> Add/ Remove Programs window; remove this version to install the newer
.NET 2.0 version.
 
            Settting up one of the web browser window to hunt for SQL Proc tutorials that I can use and
 another was set busy opening up Live Spaces for my Dev Blog. I also had to maintain my tasklist
for tomorrow, that I had it composed as a new mail. Basically, the contents listed in this mail will be
the days highlighting agenda!
 
            While all this were happening in the background, I fired up the notepad and started blogging...
here I'm!
 
(But As usual I dozed off along with my laptop before I posted this blog )

Got the project created in CodePlex


Few days back I had mentioned my subscription to the CodePlex, the SharedSource repository. Now I got my project space created. CodePlex is open for feature request and bug reporting as in any beta.
 
I'm looking forward for a clean and easy process. I'll have to take a tour myself and then have to decide. ;)
 
I've not yet setup the WiKi page available for my project, but you are always welcome at
                         http://www.codeplex.com/Wiki/View.aspx?ProjectName=DailyDiary
 
October 06

My New Hobby: Project DailyDiary

First, Apology for not adding up the dev related contents for "ISV community days". Right now, am developing an app for logging my daily expenditure and financial transactions that I make with my friends here. This was little bit getting attractive only when I thought of implementing in .Net 3.0. You know what, this is my first large scale project on WinFx and WPF.
 
        A little intro to the idea I had in my heads: I usually log all my expenses in a excel sheet. Wait wait! Don't ask, "Why not use the out of box solutions?" Anyway, nice question! But much of the details that I log are customised to my needs. I'm trying to find if this model will suite for the masses.
 
        In the log, I used to add these details: Obviously date (), amount spent on a particular item, item description (which can be simple description or header for set of items), etc.. 
        This application will be windows based to start with and it's v2.0 will be targetted on adding a webapp/web services interface so that users can log their items even while out for vacation just using the Internet.
 
 Here's a screenshot: (The color codes just customisable, to give a visual appeal on the amount greater than a factor defined.)
Project DailyDiary ReqSpec
 
       I've got the DB design as such ready. Here's the XML Schema for the same.
[Same XML format is used to represent database schema by most of the schema generators. So, I put this up in a standard format.  Here's one place where you could find the Schema definition ]
 
[Update: XML File uploaded here

IF YOU had any kind of requirement as I described here... Feel free to comment it here/ drop me an mail; both in the req spec and on DB design.
 
PS: I've requested for a project space in CodePlex. I hope I can start sharing things once the site is up!


October 04

Rendezvous - Me, The Accident and My Social Responsibility

(This isn't the right place for this post. but here it is... for those who have concern over me!)
 
  My first trip to Hyderabad was really that eventful and unforgettable! Both I enjoyed, learned a lot, worked out for the public as well! Here's the part 2 of trip especially for those who care for me! :)
 
            Yesterday(02, Oct 2006) night on my way back from Hyderabad, after attending 'MS Stud Partners meet', I was travelling back to Bangalore in a ksrtc 'volvo' bus. I started my journey at 2000 hrs, at that time I didn't know I'm going to face one of my lifetime thrilling experience. I got my seat in the right side of the bus, third row from the driver's seat. It was a semisleeper and obviously, I thought I would enjoy the trip. After having the usual 'pitstop' around 1000 hrs, and later watching the telugu movie screened in the bus, I went to sleep around 0100 hrs (just 1 hour to face-off).
 
            It was exactly 0205 hrs in my watch  - I was deep asleep, when I heard people screaming... I felt the bus was sliding towards my right side. A sudden jerk... I was in the air for a moment.. my spectacles flew off.. I could hear glass pieces shattering and falling on my head... while making a 270* rotation, I was pretty concious to hold one of my hand on to the seat handle, even though I had bad blow on some parts of my body. When the bus came to a halt (literally...), I could see my bloody hands. People were screaming like anything. Immediately, I thought "Don't wait! get out and find help!! Quick". Just one shake and wipe off! and I started taking up the rescue procedure that I had learnt sometime back. I didn't have much time for myself, just ensured my two and my  was there in right place where I kept in my pant pocket and moved on...
 
            0215hrs: While trying to move out of the bus, there was this little kid right before me, trying to move out, but he stepped on the window glass that broke off; I clinged his hand, later realizing a small glass particle tearing my left index finger.. (ouch!) I moved out and could see the bus which was lying about 7-10 feet below the road level. It was gettin worse when I found very low signal in my AirTel mobile. I didn't reach border of Karnataka, so Hutch was out of thought. I found another guy dialing the emergency "112" in his BSNL mobile.
 
            After ensuring enough people were there to help others, around 0230 hrs, I climbed up to the road, just to hear "Hey! you know there is this accident..", I thought, "Come on! I need help!!" The vehicles passed by did stop on that spot, but just to take a look what was happening. I was so angry, that I jumped off to the middle of the road and stopped the vehicle, gave them the details of my bus lying 10 feet down, asked them to just inform this in the next petrol bunk/ checkpost.. I could find 4-5 people like me trying to offer help (nope! they weren't outsider, but the passengers themselves)
 
            One from the crowd offered a ride to the nearest police station. I was ready to go along with another person, but he asked me stay back in the spot and help out others lying down. My next worry was to bring everyone to the top. No one was ready to get down again; I jumped off (and eventually fell down making few more injuries to myself, but after seeing that, few more people started coming down). First off, I informed everyone help is on the way not to worry. Then, started consoling children there and took them to the roadside. I could see the driver unconcious, but people there were already on their way to get him on correct position. This was happening for a while.
 
            Later, people were very much concerned about their luggages; piled up underneeath the bottom of the bus. This was pretty difficult to handle! The top and bottom side of the bus was on the left and right side, making it difficult to climb. Fortunately, the luggage door was open. I started climbing up, but people asked me to wait till help arrived( which I was not hoping atleast anytime soon then). Finally, I got this person with the same name as mine(call it coincidence! phew!) and we both climbed to the door. Then that guy hesitated to get down, because the only light that was glowing started flickering and it was about to burnout! No moment to waste, I literally jumped into the place and started moving the luggages out. As soon as I climbed up, the lights turned off. (Every sequence was like as if watching a movie in virtual reality! I could still can't believe I made it.)
 
            Only after people and things were brought out from the bus safe, I started worrying about me.. yes, then I realized I was wounded little badly. I had no choice but to wipe out and start moving. Once I got confirmed help is on the way, I and few others whom I worked with, got into another bus to Bangalore. The accident spot was somewhere on the highway after ananthapur (AP).
 
   Today after getting medicated, I'm in my room. I don't know what to feel? the pain? satisfaction? relief? luck? whatever you call it, this is one eventful day I couldn't forget - the way I acted , the things I experienced...
 

3-Tier Architecture with ASP.NET 2.0

Many a times, I've seen people just wondering how to do a project. For those who are still searching, MSDN has come up with a nice set of tutorials for developing a 3-tier based web application using ASP.NET 2.0
 
Here's the link
 
Introduction
 
Basic Reporting
 
Master/Details
 
This is also available in VB.NET version from here.
 
 Anyway, this is just a tutorial, more can be done in ASP.NET 2.0.
September 27

ISV Community Days (Dev)

From my post<link to the post> in my Tech Blog (http://thespoke.net/blogs/praveenkumar),

"Yesterday, I had opportunity to attend ISV Community  Days at Royal Orchid, Bangalore. The one difference for me in this event isthat I was representing the company I work for now. Myself and few of my friends were there. This ISV Community Days event is conducted by Microsoft regularly for demonstrating new technologies and tools to the software vendors. This time it was WPF, Microsoft Office 2007 system.

Here's the developer related content.

 

<soon to be updated>

September 18

Your First ASP.NET 2.0 WebApp: eLearning!

 
Last week, one of friend wanted a simple startup for ASP.NET 2.0 in form of eLearning course.
it's also for ASP.NET 2.0 starters! An online eLearning from Microsoft is available at
 
 
Just Sign-In with your Live ID (.NET Passport) and add the course to "My Learning section".
 
This course covers
  • Basic difference you should know between VS 2003 and VS 2005
  • ASP.NET 2.0 working model
  • ASP.NET 2.0 basics (Pages, Partial classes, Code Separation, etc..)
  • + An virtual Lab with example of creating an website in VS 2005

 

+> Praveen Kumar

Unable to Attach! Binding handle is invalid? (What did I do?)

Fine morning! It just happened when I was trying to run yet another WebApp in Visual Studio 2005. After designing all those cool UI for the page and embedding the code, one step more -> F5... Kaboom! I got a message saying that "Unable to Attach. Binding handle is invalid?" I thought, "What did I do?" Later here, I found that something I didn't do. heres what the solution in simple terms.
 
  1. Start -> Run -> services.msc
  2. Scroll down to "Terminal Services"  (You know, this one was disabled!   which was supposed to be running)
  3. (You guessed it!) Start this services. Set the startup "startup type" in "properties" of this service to manual or automatic.
Happy Coding!
 
Praveen Kumar
September 15

Heard of C#? good! - F# ??? - go ahead!

 
Don Syme at MSR says,  "F# is a programming language that provides the much sought-after combination of type safety, performance and scripting, with all the advantages of running on a high-quality, well-supported modern runtime system."
 
 
Here's a couple of videos in C9 on this:
hmm. I wonder what's the next big thing?
 
September 13

Rebirth of a Racing Freak

Yesterday while I was cracking away the puzzle (supposed to be a hack puzzle!) along with my friend Balamurali. we had a little chat about blogs. After during the late afternoon, I remember he started blogging a year back while we were in college , but discontinued in concern with studies. He was also maintaining a online forum for his class. I asked why not start now? Obviously, he didn't say no. Atleast never no to me 
 
Now, back to the drawing board...(??) but wait all those should be already existing. First, get the forum up and running. So, we both headed to the forum site and found his lost login. fortunately, he remembered things even now. Then the redirection site. you know which one. Yeah! it's dot.tk. Well, It was suspended after a long period of inactivity. We were forced to recreate the redirection urls. and now, it's available at www.EceAitec.tk
 
Alright! What about his blog. Again, this was simple. He had been blogging in MSN Spaces, now Live Spaces. So, things became simpler to carry out. He started staright ahead with Live Spaces and few round abouts here and there, he was ready to give it a shot. Next minute, his blog was refurbished! and now, it's at www.balamurali25.tk (http://balamurali25.spaces.live.com)
 
Best of luck pal! for embellishing your online space!!
 
A little about him: Damn cool! really smart. a racing freak turning into a techno geek! More than that he is ferrari fan!

Puzzling myself for a while!

 
 
One of my friend, send me this forward mail.
 
Try out this puzzle & try to reach out to Page 8(minimum), try to reach
till page 23.
 
After a longtime getting techie, why not freak out online... So, myself and my friend started cracking it. Well, it took just about 20 mins for us. As usual, we amazed the team. and became little busy tipping off every level to others who got into this puzzle.
 
It's quite interesting and fun. Though not techie.
August 26

Getting my hands dirty with ASP.NET

Recently, I don't know why, but ASP.NET got my attention. At the right moment, when I started practising on few web apps (ASP.NET Web Applications), I got an oppurtunity to build up a website for Book Shopping.

Here are the specs in brief:

The site design is ready with wireframe.  
                           So, few CSS based rework would make it ready for  ASP.NET code

 Basic operations like, user/ admin login, view/search for books, cart management, and database management(for admin)

 This should be easy considering Microsoft Enterprise Library in hand. Although had to take care of database operations, the challenge was in making the website operational. Being first complete website built by me in ASP.NET, I'm trying to be simple and clean in the implementation ;)

August 15

Developing a web project w/ SE Concepts

 

After quite a long break in developing a complete application in .NET since my ), here a small project that will focus on software engg concepts as well.

Alright, lets talk software engineering now along with the language of .NET

A brief description "
           Develop a web application for online publishing agency. The application should accept registration from public for specified list of e-magazines.
Application will have a registration page and confirmation page. A summary page for admin to view # number of registrations by e-magazine
Registration form will accept name, address, email-id, and selection list of e-magazines (C# Journal, Web programming with ASP.net, XML Programming with .Net …)

The requirements looks as simple and here's how my design goes.

Project: iMag - 'Your Daily dose of Technology'

P.S: I entend to keep this entire project very simple, yet adhere to SE Concepts so that implementation is piece of cake. Pseudo codes are available whereever necessary.

Disclaimer: The techniques used are customized and doesn't follow any particular methodology.

I assumed my design should adhere to the following target in Extensibility:

  • Assumed SQLServer only (cannot extend to other db)
  • Addition of new ui components facilitated
  • Assumed Only new registrations
  • But extensible to update order details
  • Users can be added dynamically and the passwords are hashed and stored in DB

Design:

DB

Database is specified generic; I implemented in SQLServer

    • Subscriber (sid, pwd, sname, saddr, semail)
    • MagColl (mid, mname, msubcost)
    • Order (onum, sid, mid)
    • AdminLogins (user, password)

Data Objects

These classes generate Objects to represent the relational data inside the application.

Subscriber (id, name, addr, email)
mag (id, name, cost)
order (s, m[])

Data Access Logic

Following are the DAL functionalities identified. - I think the reason for such methods are obvious. The methods listed below have following signature <return-type> <method-name>(params)

  • LoginManager
    • bool AdminPwdCheck(uid, pwd)
  • Magazine Data Manager
    • MagList GetAllMagazines()
  • Order Data Manager
    • int SetMagsSubscribed(uid, maglist)
    • maglist GetMagsSubscribed(uid)
    • int TransactOrder(orderinfo)
    • orderlist GetAllOrders()
  • Subscriber Manager
    • int CreateSubscriber(subscriberinfo)
    • subscriberinfo GetSubscriberInfo()

Business Layer

You could have guessed it already, there would be not much to write in BL here.

  • Magazine Manager
    • list getAllMagazines()
  • Order Manager
    • bool OrderSubscription(o)
            { return TransactOrder(o)
               }
      list getAllOrders(name, pwd)
            {  if(pwd==getpwd(name))
                       return list getAllOrder();  }
    • list getMagsSubscribed(sname, pwd)
             {   s=getSubscriber(sname)
                  check(pwd valid)
                  return getMagsSubscribed(sid)  }
  • Subscriber Manager
    • subscriberinfo GetSubscriberInfo(uid)
UI

I'm still in the process of finalizing the code details. anyway here's the UI design details. Will get back here with few of code snippets.

    •      Registeration Form
      • New Registration
      • View my details
      • Admin Login
    •       Confirmation Form
    •       Summary Form

That's all with the design, let's take a walkthroug on some of code snippets...

             Implementing the database shouldn't be a problem. I used SQLServer 2005(and 2000). The data classes are to represent the tables of database in the application. classes in all the layer would utilise the data objects from these classes. The data classes are made serializable:

[Serializable]

public class SubscriberInfo { ... }

Classes in the DAL (Data Access Logic) layer will have code snippets to access data base and retrieve the data and represent in object form.

Ex:

public

SubscriberInfo getSubscriberInfo(string subscriberName)

{

SqlHelper sqlHelper =

new SqlHelper();

SubscriberInfo s =

new SubscriberInfo();

try

{

SqlDataReader dr = sqlHelper.RunSelectQuery("Select * from Subscriber where Name = \'"+subscriberName+"\'");

s.SubscriberID = dr["SubscriberID"].ToString();

s.Name = dr["Name"].ToString();

s.Password = dr["Password"].ToString();

s.Address = dr["Address"].ToString();

s.Email = dr["Email"].ToString();

}

catch(Exception ex)

{

throw ex;

}

return s;

}

In the above method, a special SQL Helper class is made use of, which opens up connection and facilitates execution of SQL commands sent to it. I'm making use of DataReaders, since the DAL objects and database are available in the same side of execution (server), there won't be significant performance loss. Further, DataSets can be used if the client wants to manipulate on the data. But here the specs need us only to display the data. (there is also facility to update the data directly, but I presume to keep it simple )

One good challenging task in design would be to create the GetAllOrders() method, which requires to package the subscribers, magazines subscribed and the order details in the format:

OrderInfo { 

int _orderID;

SubscriberInfo _subscriber;

MagazineList _magList; }

The LoginManager class will contain the code for manipulating on password using hashing. (soon...)

The Business layer wouldn't contain much code in this app, since much of th activities are only data transactions.

 

 
Photo 1 of 2
So far... PraveenNet CodeSimulator Stats so many hits...
View Stats
GlobTrackr Globe Trackr for CodeSimulator
Locations of visitors to this page
Blog Directory - Blogged
Blog Flux Directory

web analysis

Praveen's Tech n Pro Blog

Loading...Loading...