Navigation

Search

Categories

On this page

Using MySQL with asp.net for authentication/authorization
Login Page loses styles when using Forms authentication
VS2008 released
1. Building My Own Social Networking site: User Interface: Target Screen Resolution
Hosting DasBlog 2.0 on GoDaddy
I am back, and a better developer...
My Sleepless in NY weekend!!
Vista + Sql Server 2005 Express = Not DB Admin (by default)
Welcome to DotNetSurfers

Archive

Blogroll

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

RSS 2.0 | Atom 1.0 | CDF

Send mail to the author(s) E-mail

Total Posts: 23
This Year: 0
This Month: 0
This Week: 0
Comments: 7

Sign In

 Wednesday, December 12, 2007
Wednesday, December 12, 2007 11:55:45 AM (Mountain Standard Time, UTC-07:00) ( asp.net | authentication | authorization | mysql )

MySQL database is a good option for projects that need large stable databases but cannot afford the Oracle or MSSQL price tag. The provider model in Asp.Net 2.0 allows us to use MySql with plenty of Out of the Box functionality. When using Forms Authentication, you can just configure the application to use the MySQL provider, and then use the ASP.NET Web Site Administration tool to manage users and roles in your application.

1. Make sure you have installed the latest version of MySQL Connector/Net. This also adds an entry each to the membership and rolemanager providers in the machine.config files behind the scenes.
2. Open the Asp.Net Web Site Administration page, go to  'Provider ' tab and click on "Select a different provider for each feature (advanced)".
3. Select ' ' as the Membership Provider, and ' ' as the Role Provider.


4. Add the connectionstring to your MySQL server under the name 'LocalMySQLServer'.
        <remove name="LocalMySqlServer"/>
        <add name="LocalMySqlServer" connectionString="server=localhost;database=mbs;uid=root;pwd=mbs"/>

5. Goto 'Security' tab and manage your users and roles.

 Saturday, December 08, 2007
Saturday, December 08, 2007 5:24:47 PM (Mountain Standard Time, UTC-07:00) ( asp.net | login | stylesheet )
One of my colleagues faced this problem recently while working on a new asp.net site, where his login page was not rendering as per the default stylesheet whereas all the pages displayed fine once the user logged in. When i looked at his web.config file, i saw that anonymous access was blocked to all resources on the site, and adding an <location> element allowing anonymous access to the images and stylesheets folder fixed the issue.
It looks something like

<location path="img">
     <system.web>
            <authorization>
                    <allow users="*"/>
           </authorization>
    </system.web>
</location>


-Latish Sehgal
 Monday, November 19, 2007
Monday, November 19, 2007 1:45:43 PM (Mountain Standard Time, UTC-07:00) ( VS2008 )
linky
Yay for javascript intellisense..

 Monday, October 29, 2007
Monday, October 29, 2007 8:50:17 PM (Mountain Standard Time, UTC-07:00) ( Social Networking site )
 Trying to decide whether to design a fixed,relative or fluid layout, and what resolution to target can drive you nuts. There are too many factors to consider - popular opinions, statistics, what others are doing...
 So how to decide what to target? Simple. Look at what similar successful sites are doing; If we look at facebook and orkut, it turns out that both are using fixed width layouts. That actually makes sense, because you would want more control over the presentation in a social networking site, it's a major factor in drawing the users. Facebook is conservative and keeps the width to 799px at all times, therefore ensuring most of its users do not end up with the annoying horizontal scrollbar (unless they resize the browser window). Orkut targets higher resolutions and has a minimun width of 920px and maximum width of 1003 px.
 According to W3Schools Browser display statistics, 14% of the users still use a resolution of 800x600, with the rest using bigger screen sizes. The application size should depend on your perceived audience, of course, and I would like 100% of my audience to be comfortable with the site. So, right now, targetting 800x600 screen size seems sensible or not a bad idea at least. Also, most of my colleagues with insanely large monitors and resolutions always resize their browsers and open multiple applications in parallel. So, targetting a smaller resolution should not lead to a lot of squinting.
This is the first post in a series on "Building My Own Social Networking site", i hope to write many more as i progress with my site, which i work on in my spare time.

Note: You can measure window sizes using JRScreen Ruler, or alternatively you can examine the css of a site using the excellent Firebug AddOn
for Firefox.

Monday, October 29, 2007 4:03:58 PM (Mountain Standard Time, UTC-07:00) ( )
This blog is hosted on a GoDaddy Economy Hosting account, and I had some trouble in getting all the features to work initially.
I got some help from Aakash's article on the setup.
To get the "Contact Author" and "Comment Notification" to work, i had to set up an email account with GoDaddy ( I had some free email forwarding accounts as part of my plan). After that, updating the Configuration tab in DasBlog with the correct smtp server setting (relay-hosting.secureserver.net) did the trick and the email features are working as expected.

 Thursday, October 18, 2007
Thursday, October 18, 2007 7:05:56 AM (Mountain Standard Time, UTC-07:00) ( Better Developer )
    I have been in blog silence for some time, i was busy starting my quest to be a better developer. It all started with Scott Hanselman's podcast on "Be a Better Developer in six months", and a series of related blogs i read on the same topic. Since then, i have been busy with :-
  • Reading blogs, lots of them. I am subscribed to about 64 blogs (mostly technical) right now, giving me more to read than i can handle everyday.  Here's my google reader subscription list.
  • Coding more - That's an obvious one, i guess :). More on this below.
  • Podcasts - I currently listen to Hanselminutes, DotNetRocks, Channel9, and the Asp.Net podcast.
  • Reading books - I guess this is more on being a better person than being a better developer. I try to read the books that other bloggers recommend. I do this 1 hour before sleeping and it really helps in relaxing and sleeping better. So far, i have covered
  • Waking at 5 a.m - This gives me 2-3 hours everyday to focus on my own stuff, and coding on my project.  I do not check email till i reach office.
    I want to elaborate a little on the "Coding more" part. I work as a dot net consultant for a nice Fortune 500 company, but the work i do for them is well, repetitive. It does not cover all technical concepts that i would like to learn or play with. So, i have decided to work during my free time on my own project, its kind of like a social networking site. It doesn't sound very innovative, but i think it has the potential to mature in a real world app. I'll implement everything myself, from the UI to the DB layer to security and logging.  I'll blog about the whole thing in a series i'll call  Building My Own Social Networking site. I'll talk about all the dilemnas i face, and the choices i make and why i make them.
    I guess i could be a little more organized with my efforts, and should be able to bring in more structure in my routine as time passes. I have not, however, set up a timeline for my goals, but i already feel that i know much more than i used to, and that the initiative is working. I have too much to learn and do not see this ending any time soon.
Till next time!
Latish
 Tuesday, September 11, 2007
Tuesday, September 11, 2007 12:15:27 PM (Mountain Standard Time, UTC-07:00) ( Sharepoint )
 I was one of the participants in the Sleepless in NY - The Ultimate Sharepoint Weekend. It was an awesome experience and hats off to Infusion for pulling it off so well. The trainers were able to  squeeze in so much in these 2 days. I am a sharepoint newbie and this weekend increased my knowledge by leaps and bounds. And of course, there were plenty of cool prizes including a really high end laptop and a trip to MS - Redmond.
 We were put up in the Park Central hotel near Times Square, but we hardly got to stay there! The training schedule was really intensive, mixing in labs to let us practise what we were taught, and it all ended with a saturday night assignment for us to to develop something useful for the Community Kit for Sharepoint. We were divided into groups of three and my group decided to come up with a cool media library webpart for sharepoint collaborating sharepoint and silverlight. We worked really hard on it all night, but were unfortunately unable to complete our project by the morning, partly due to the new Silverlight RTW giving some unexpected issues; and of course our inexperience with both sharepoint and silverlight slowed things down. But it was great to work along with such talented people and just be creative. The judges were really interested in our project and commented that it woud definitely be a contribution to the Sharepoint society and that we should try to finish it.
 Another highlight of the weekend was that we got to meet and hang out with Carl and Richard from DotNetRocks. Besides the talented Infusion trainers, Sahil Malik (MS MVP) and Lawrence Liu also gave excellent presentations.

 Not only did i pick up so much in sharepoint in the 2 days, but i also got to meet some really talented people. I am thankful to Infusion for that and hopefully they will continue to host such great events in the future.
-Latish

 Monday, September 03, 2007
Monday, September 03, 2007 10:26:41 AM (Mountain Standard Time, UTC-07:00) ( )
I started working on Vista recently. It does not give you admin privileges by default (check out User Access Control for more details).

I was trying out some Web Parts sample code, and for quite some time, i wasn't able to install NorthWind database into the Express DB; i kept on getting Insufficient Privileges errors. After lurking around on user forums, i finally found what i was looking for. I'll just mention the simple steps to resolve this problem.

1. Make sure you got the latest release. Check here.

2. Open Sql Sevice 2005 Service Area Configuration tool. Click on the link Add New Administrator to open Sql Server 2005 User Provisioning Tool for Vista.



3. Use the tool to give admin privileges to your user account.



That is all you need to do. You are now the administrator for your database.
Happy Programming!!

Latish

Sunday, September 02, 2007 11:44:17 PM (Mountain Standard Time, UTC-07:00) ( )
Hi there!!
Welcome to the DotNetSurfers Blog. I am the brains (or lack of it) behind DotNetSurfers.
I am going to try to post dot net concepts and best practices here as regularly as i can.
I hope you enjoy it.
Have a nice day.

Latish Sehgal