Aug 27 2008

View code not appearing in Visual Studio 2008

Category: Programmingavinashsing @ 2:52 am

Another thing that I need to do is download the hot fix which addresses a couple of problems with Visual Studio 2008 Team Suite so that it can get rid of the annoying of having to go to the Solution Explorer to be able to “view code” in a Web Application rather than right clicking on an aspx page and selecting the “view code” option. The hot fix download is located below:

https://connect.microsoft.com/VisualStudio/Downloads/DownloadDetails.aspx?DownloadID=10826


Aug 26 2008

How to find out what access users have in Windows?

Category: Programmingavinashsing @ 9:22 am

Many times you need to find out what access a particular windows user has and it’s not very easy to get that information. I wanted to get a list of folders/directories to which a particular user (local user in windows) had access to so that i could debug an application. Luckily, i found about a small command line utility tool which enables you to do just that. You will need to download the AccessCheck program and use it to get the access report.

http://technet.microsoft.com/en-gb/sysinternals/bb664922.aspx
http://windowsitpro.com/article/articleid/97672/using-accesschk-to-view-which-files-and-folders-a-user-has-access-to.html


Aug 19 2008

One month car insurance

Category: Automotiveavinashsing @ 5:59 am

I was talking to a friend of mine the other day and he mentioned that he needed to get car insurance for one month only. So I was like “Why can’t you take a normal car insurance policy?” and he told me that a relative of his gave him an old car which they don’t use anymore but could become handy for him. The only problem was that the car was like 12 years old and he was not sure whether it was worth keeping it. So he decided to take 1 month car insurance to try out the car and if he likes it, then he’s going to go for a standard car insurance. This would give me the flexibility of cancelling the insurance if the car was not worth the trouble. Well I hope things work out for him :)


Aug 18 2008

Integrating FCKeditor in my ASP.NET site

Category: Programmingavinashsing @ 5:42 am

So I wanted to try FCKeditor in a website i was redesigning. The first problem i foresaw was that it didn’t have an image resize option. However it seems to be the one closest to meet my requirements, therefore i’m thinking of hacking an image resize utility into the library.

As soon as i copied everything to my project, I got an HTTP Error 404 - Not found. I was like, what the hell just happened there, but then i googled the problem and find the solution. You need to specify the BasePath  (the path where your fckeditor script is located) as follows:

<FCKeditorV2:FCKeditor ID=”FCKeditor1″ runat=”server” BasePath=”~/FCKEditor/” ></FCKeditorV2:FCKeditor>

This gets rid of the error.

However if you want to take advantage of the image uploader, you will need to edit fckeditor.js as follows:

var _FileBrowserLanguage    = ‘aspx’ ;    // asp | aspx | cfm | lasso | perl | php | py
var _QuickUploadLanguage    = ‘aspx’;

This tells the script to use asp.net as the server side language.

You will also need to modify config.ascx (fckeditor/editor/filemanager/connectors/aspx/config.ascx):

In CheckAuthentication, return true!

In SetConfig(), specify where the files which are uploaded are going to go:

UserFilesPath = “~/userfiles/”;

It is also good to have all images/files/media in separate folders but by default this is not true for quick uploads. So do this for File, Image, Flash and Media:

TypeConfig["File"].QuickUploadPath = “%UserFilesPath%file/”;

TypeConfig["Image"].QuickUploadPath = “%UserFilesPath%image/”;

TypeConfig["Flash"].QuickUploadPath = “%UserFilesPath%flash/”;

TypeConfig["Media"].QuickUploadPath = “%UserFilesPath%media/”;

Remember to give ASP.NET worker process read/write access to the uploaded folder (UserFiles)!


Aug 18 2008

Setting up Visual Studio for improved productivity

Category: Programmingavinashsing @ 5:31 am

Once you install Visual Studio, there are a few things which you need to do so that you are comfortable with the environment and to make your life easier.  Here’s what i like to do:

1. Show line numbers!

2.  Insert attribute value quotes when typing

This can be enabled by
Tools -> Options -> Text Editor -> HTML -> Format
turn on - “Insert attribute value quotes when typing”

3. Change the colours of delegates, Enum etc

More on that later…

4.  If you don’t want IDs of controls to be forced to be unique

Go to Tools -> Options -> Text Editor -> HTML -> Miscellaneous
turn off - “Auto ID elements on paste in source view”