Praveen's profileUniverse of a DeveloperPhotosBlogListsMore ![]() | Help |
Universe of a DeveloperShare - Learn - Innovate - Benefit |
||||||||||||||||||||||||||||||||
|
This user currently is not registered with Windows Live QnA account. Click here to learn more and get started. This user currently is not registered with Windows Live QnA account. Click here to learn more and get started. Wassup!
Jacobytewrote:
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
My UserAgentI 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;
Screenshots:(1) (2) (3)
Seeking help at the IE ForumI’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…
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. 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. 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
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...
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.
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 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! 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. Solution: The solution itself is very simple (at least in our case).
<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>
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"
I’ve submitted this to IE forums here, let’s see what happens next! Few things learned in the course of finding the solution:
More comments and critics welcome!
July 08 Adding/ Trapping 'Return key' hook to input text boxEven 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...
"A Runtime error has occured. Do you wish to debug? Line 55 Element not found" (See screenshot) ![]() When I tried to debug with VS 2005, the error was navigated to in res:ieframe.dll/tabswelcome.htm Line 55 <body .... onload="window.external.BuildNewTabPage(); .... (see screenshot) ![]() Little search on "window.external.BuildNewTabPage()" lead me only to a page in the MSDN library over here and that too was not helpful 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. 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 June 19 Some SQL Query problems solved todayToday 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. 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] 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
-- 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
May 17 Have you forgot something..? ASP.NET Peformance TipsBefore 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,
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 DemoMicrosoft 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
Microsoft SharePoint Designer Team Blog is a great source of information too. NewsUpdate: BizTalk Server 2006 Documentation in PDF FormatMicrosoft BizTalk Team has published an update to the BizTalk Server 2006 core documentation PDF here. Here are some of the juicy details:
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.
March 24 Invalid ViewState error - a rare case scenarioAlright! 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
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
Resolving the problem reported…:
Possible scenarios which would have caused this problem:
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!
>> 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?
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
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
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!
trying to list down the tasks done/ pending and planned for the my project. I thought of taking
a break
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
here I'm!
(But As usual I dozed off along with my laptop before I posted this blog Got the project created in CodePlexFew 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
October 06 My New Hobby: Project DailyDiaryFirst, 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 (
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.)
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! :)
It was exactly 0205 hrs in my watch
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..
Later
Today after getting medicated, I'm in my room
3-Tier Architecture with ASP.NET 2.0Many 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
Tutorial 1 - Creating a Data Access Layer
Tutorial 2 - Creating a Business Logic Layer
Tutorial 3 - Master Pages and Site Navigation
Basic Reporting
Tutorial 4 - Displaying Data with the ObjectDataSource
Tutorial 5 - Declarative parameters
Master/Details
Tutorial 7 - Filtering with a dropdown list
Tutorial 8 - Filtering with two dropdown lists
Tutorial 9 - Filtering across two pages
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),
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
+> 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.
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 FreakYesterday 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
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.
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.NETRecently, 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. 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 iTrust project (that won the nations' Best Project), 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 " 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:
Design:DBDatabase is specified generic; I implemented in SQLServer
Data ObjectsThese classes generate Objects to represent the relational data inside the application. Subscriber (id, name, addr, email) Data Access LogicFollowing 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)
Business LayerYou could have guessed it already, there would be not much to write in BL here.
UII'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.
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.
|
|
||||||||||||||||||||||||||||||
|
|