Cool Tech Girl

This will be the techie me. Any problems, issues or ideas I come across during my day to day life as a Software Engineer will be posted here.

Google
 
Web This Blog

Wednesday, August 24, 2005

Google Google Everywhere

In the past couple of days, Google has come out with as many news things. First the updated and improved Google Desktop. Ah well!! So I never installed the first version and therefore thought to give Version 2 a try. The sidebar idea seems pretty good. Good to have news and weather and stock information on your desktop without having to open the browser. But there was some annoying stuff too. Well, the Quick view stores all the recent or most viewed pages you have visited. That means any logout pages, popup pages or just some image files, things that are useless and you would never want to view quickly. My news feed kept saying "Loading..." And the weather feed kept saying "Server is unavailable". Yes, I know its in Beta.
Then after rumors yesterday on Slashdot which incidentally turned out to be true, Google is out with Google Talk. There have been quite a lot of speculation here and there. I haven't downloaded the IM yet. I would have to get a Gmail account first. Yes, I did get an invitation and I had created one. But I didn't use it for some time and then I tried to log in. Obviously, I forgot my password so I tried to do the usual "forgot my password" stuff, but for some reason, google never let me reset my password. It kept saying to try after 5 days. I am sure now my account has gone :-(.
Oh, and last but not the least, I wish someone would gift me Google stock, atleast a 100 of them.

Tuesday, August 16, 2005

Update on ShDocVw.dll Issue

So finally found a solution to the shDocVw.dll issue. Well, actually a co-worker found it. Because there is another web service using an older reference of the shDocVw.dll, for consistency, I had to use the same. The solution is to remove the Interop references under the project references and add them again but this time pointing to the version you want. The version already generated by the previous web service in my case. So let the web browser control remain as it is, that is we do not need to remove the web browser component. We can directly refer to the interop dlls as a .NET reference instead of letting the web browser control generate and update them everytime we build the project.
Make Sense?

Thursday, August 11, 2005

ShDocVw.dll Issue

I am having a strange issue. I have an .NET class library application which references the Microsoft Web Browser control, shDocVw. dll located in the System32 folder. When I integrate my library into another main application that already has the Interop DLLs created by an earlier reference, navigation to the browser gives error saying that Navigate2 method was not found. If I then update the Interop DLLs with the one created in my build path or the bin folder, everything works fine. I noticed that the main application DLLs have timestamp of April whereas my System32 dll and hence the Interop dlls have a timestamp of May. Does this mean that because I am probably referencing an updated version of the DLL, the navigation doesn't work with the older files? Do I have to update any client machine using the application with the updated Interop DLLs in order to get everything working smoothly. Or can I replace my system dll with the same version that was used for the main application and then try? What would be the ideal solution? Any answers?

Friday, August 05, 2005

Learning ASP.NET 2.0

For those of you out there wanting to start learning ASP.NET 2.0, there are great resources on MSDN. You can watch the live webcasts presented by Fritz Onion on MSDN by going to http://www.microsoft.com/events/series/essentialaspnet.mspx . These just started on 4th August 2005, so its not too late. I have seen almost the whole webcast series on ASP.NET 1.0 available on-demand. The webcasts are pretty good and basic for beginners. They are available in c# and VB both. The book Essential ASP.NET by Fritz Onion should be used along with the webcasts for more detailed information.
I know many people out there are anti-Microsoft and some of it is valid, but I think all the free study materials microsoft provides is great. Whatever their intention, if you have to learn these or use the particular platform, you might as well take advantage of the free tutorials. It helps one to get started and is bit less boring the just reading a book.

Wednesday, August 03, 2005

Big red cross(X) on datagrid in .NET

Sometimes when you load a datagrid, you get a big red cross instead of any data. There may be numerous reasons to this, most related to data binding etc.
But the one I came across seems to only happen if your .NET application is an add-on in other applications such as VB6 or Outlook and only on Windows 2000. I got a specific error - "Invalid Parameter used". My grid showed up perfectly on Windows XP. Even without any data binding, the red X always showed up. Finally after doing various permutation-combination of searches on google groups, I hit the jackpot. One post said to set the ParentRowsVisible to False and it worked. If you have hierarchical rows in your grid, this solution is not for you. But for most other type of grids this should work. I am sure there should be some other solution like finding what is actually missing in Windows 2000 that passes in an invalid parameter to the DrawRectangle function when drawing the parent rows and why does it happen when accessing through another application.
If you happen to know or have any ideas, I would appreciate the feedback

Combobox in DataGrid in .NET

The datagrid is really a pain to work with sometimes. This datagrid for .NET is very basic and so if you need complicated functionality like comboboxes, you would have to make your own. There are lots of postings about getting dropdowns in the datagrid by deriving from the DataGridTextBoxColumn column style. I tried using this, but for my purpose, I had two columns of combos, where the second gets filtered based on the selection in the first. In such a case, the derived column style will not work as you have to change content of combos on a per row basis, whereas the column style is for the entire column.
So eventually, I just ended up having a combo on top of the grid and moving around the combo to the cell that gets focus and then write its values to the cell. You would have to do a lot more depending on what your requirements are.
Hope this helps. If you have any issues, questions or remarks, feel free to comment.

Tuesday, August 02, 2005

Opening EXE from a web service

One can invoke a exe application from a web service using the Process class, setting its properties and calling process.start. Sometimes you may have problems opening the application because the exe does not give access to the ASPNET user by default. You need to specifically change the permissions on the exe you want to open from a webservice. The ASPNET user is generally computer_name/ASPNET.
Also keep in mind that if your exe writes any files, the ASPNET user needs access to the location or folder where it writes or makes changes. I had a hard time finding this out.
One thing to keep in mind is that a web service will not allow you to see any application opened from it because it is on the server, so the client cannot see it. If you use localhost, you can see that the exe is running in the task manager.

Sample code for opening exe from web service
Dim myProcess As New Process
myProcess.StartInfo.FileName = {"filename.exe" }
With myProcess.StartInfo
.Arguments = {arguments(string)}
.WorkingDirectory = {directory}
.CreateNoWindow = True 'set this to true if you want the exe to execute in the background (wrt. opening from normal app)
.ErrorDialog = True 'if you want your exe to show error}
.RedirectStandardError = True
.RedirectStandardOutput = True
End With
myProcess.Start()
Dim sErr As String = myProcess.StandardError.ReadToEnd()
Dim sOut As String = myProcess.StandardOutput.ReadToEnd()
myProcess.WaitForExit()

Monday, August 01, 2005

Opening Post

This is my first post on this blog. Just to give you a brief insight into why this blog has come into existence. Lately at work, I have been doing some .NET stuff and as I am fairly new to it, I have been having lots of problems. I have found solutions from the ever reliable google groups but as most of you know, searching for the right solution using the key phrases is sometimes not so easy. So I thought why not share whatever I have found from different places through this blog. Here, I will be posting any information, solutions and workarounds I find for any kind of problems or issues in software development mostly dealing with VB.NET and ASP.NEt with some C# thrown in the mix. From time to time, I may also post any cool links or information I find on the big bad web out there.
So enjoy and hope to see a lot of you around. Comments are always appreciated.