Posted by elberon5
Fri, 30 Mar 2007 15:37:00 GMT
I'll be editing this article soon, but just to get you started here's some posts that will point you in the right direction and a synopsis of the approach I took.
We're dealing with the new Asp.Net 2.0 Membership and integrating that with some good old classic asp.
Scott Gu's Blog Post - This will point you at the wrox security book, which I highly recommend. This post shows you how to make asp.net intercept all requests to your server. It doesn't work on XP and IIS 5.1. Also be sure that your IIS 6 isn't running in 5.1 isolation mode.
dotnetwookie's post - Here's a nice lazy workaround for importing legacy users. Using this you can hold off on importing users until you're good and ready.
The trick to it is that you don't do a full integration. You just set your session variable for .net and classic and let them go about their business until you are ready to eventually kill all the classic pages. You are going to run into problems with the two timing out at different times. I haven't tackled that problem yet.
Here's how you do it. I'm assuming you've got a login page that classic already uses and sets a ton of session variables, but you can't figure out how to make that run from asp.net. What you do is overload your Asp.Net login page so that it redirects the user to a new classic asp page when it authenticates them. This asp page sets the values you originally set in your old login page then pushes the users onto the page they originally requested. There's one trick to this. The users authentication ticket doesn't get set until they hit an aspx page. So put a page in-between the login and the classic session variable setting page to drop the ticket onto the client.
I'll post some code for this soon, if anyone is actually interested. The method you want is OnLoggedIn in your asp:login and you'll want to pass along the ReturnUrl from the in-between page to the classic asp so it will know where to go.
Good Luck. I'll post soon on how to deal with your virtual directories and why they don't share the membership with the root. And include some more code.
Ignore this part, These are just some of the keywords i used to search for this that will hopefully get it ranked higher so that devs can find this. Keywords: HttpRequest, HttpResponse, Login, Authentication, Membership, Asp.Net, Server Side Ajax, HttpWebResponse, HttpWebRequest, Server.Execute, virtual directories, Session, State, Passing, Sharing, Peanuts. ASP.Net Classic Asp User Integration
no comments
Posted by elberon5
Thu, 08 Mar 2007 17:55:00 GMT
http://blogs.msdn.com/ie/archive/2007/01/09/ie-developer-toolbar-beta-3-now-available.aspx
This is very similar to Firebug for FireFox
Thank you gentooflux for this link.
no comments
Posted by elberon5
Wed, 07 Mar 2007 04:34:00 GMT
So I read about this "CrossPage Posting" functionality in the Essential Asp.Net 2.0 book. The ability to cross page post like you could do in classic asp 3.0. At the time I ignored it, thinking I would probably never use it.
I finally had a need for it because a client wanted to have a search screen located on a different page than the existing search/results page and I didn't feel like writing the page over or moving the page into a server control.
It was quite simple to do with the cross page posting. Here's a quick article that I had used to get started. It had everything I needed in it.
http://www.dotnetjohn.com/articles.aspx?articleid=176
no comments
Posted by elberon5
Wed, 28 Feb 2007 16:29:00 GMT
This was not fun.
I had a javascript that I needed to register dynamically inside of an updatepanel, in a server control, within a Page using a MasterPage. For some reason all the embedding isn't cool with the usual syntax for adding client scripts via the server.
Solution
no comments
Posted by elberon5
Wed, 21 Feb 2007 15:47:00 GMT
Here's a nice open source tool for comparing directories, files, and text.
http://winmerge.org/
Another great tool
MWSnap - Screen Capture, Color Picker, Screen Ruler and more.
-enjoy
1 comment
Posted by elberon5
Fri, 16 Feb 2007 05:32:00 GMT
In query analyzer :
exec
sp_change_users_login 'Auto_Fix','UserName'
Now this was the old way. You ended up with orphaned users when you transfer databases between SQL Servers using the old Backup/Restore trick. You bring over users from the one server, that don't map properly to the same user in the new database server.
The New Method - this one lets you move em between 2k5 and 2000 and vice-versa
Database Publishing Wizard.
-enjoy
Posted in SQL | no comments
Posted by elberon5
Wed, 14 Feb 2007 19:06:00 GMT
Took less than 20 minutes to get this goin. I went with the copy of the windows install folder onto my usb drive.
Worlf of Warcraft fun
Posted in ubuntu | no comments
Posted by elberon5
Sun, 11 Feb 2007 05:16:00 GMT
Uh. What gives? Thought this was a asp.net blog? I decided I want to use something different for playing around with Ruby and Rails. So I decided to go with ubuntu. It's a free Linux distribution that's got a lot of buzz around it lately.
Here's what I had and what I did to get started. I had an extra hard disk sitting in my pc that I wasn't using. I strongly suggest this if you don't want to risk messing with your windows installation. This is about the only requirement other than an internet connection. The first thing you need to do is get the ubuntu installation and burn it to a CD. You can get the file here.
Next boot your PC to the CD. You'll be able to play around with ubuntu before you even install it. This is cool, you'll actually see if your drivers are all available by default. This version booted definitely runs slower than the actual install, don't be discouraged. If it looks good, install it. It will automatically put the GRUB boot loader on your system so you can get into ubuntu or windows.
Now for the cool stuff. If you get your 3d video card working right you have to attempt to install this - Beryl
Here's a video
of it in action.
I learned a lot about linux in the 10 hours or so I dedicated to getting this all working.
- You can switch between the cli(command line inteface) and gui(graphical user interface) quite easily. You can turn off the gui with this command - "sudo /etc/init.d/gdm". Other useful commands for this - Ctrl+Alt+F5 (switch to cli), Ctrl+Alt+F7(switch to gui), Ctrl+Alt+Backspace (reset gui).
- "sudo" is an interesting command which i think is unique to ubuntu. You use sudo before a command that you want to run as root. Ubuntu doesn't have a root user that can login, it uses this instead.
- "/etc/X11/xorg.conf" - This is the configuration file. When you're fighting to get your video card working, this is the file you need to get into.
- "sudo dpkg-reconfigure -phigh xserver-xorg" - This is the command you use to reset the video driver when you can figure out how to use a text editor for xorg.conf in the cli.
- System->Administration->Synaptic Package Manager - This is where you install and uninstall packages.
Once I get ruby and rails running on ubuntu i'll throw up another post. about that.
Posted in ubuntu, Ruby | no comments
Posted by elberon5
Fri, 09 Feb 2007 17:14:00 GMT
Step 1: Create your own BoundField - you'd want to put this in a file in your App_Code folder.
namespace myNameSpace
{
public class myBoundField : System.Web.UI.WebControls.BoundField
{
public int MaxLength
{
get
{
int i = 0;
if (this.ViewState["MaxLength"] != null)
i = Int32.Parse(this.ViewState["MaxLength"].ToString());
return i;
}
set { this.ViewState["MaxLength"] = value; }
}
protected override void OnDataBindField(object sender, EventArgs e)
{
base.OnDataBindField(sender, e);
Control c = (Control)sender;
if (c is TextBox)
{
TextBox txt = (TextBox)c;
if (this.MaxLength > 0)
txt.MaxLength = this.MaxLength;
}
}
}
}
Step 2: Make it so all your aspx pages can access this new user control. In web.config add:
<system.web>
<pages>
<controls>
<add tagPrefix="myTagPrefix" namespace="myNameSpace" assembly="App_Code" />
</controls>
</pages>
</system.web>
Step : Use the custom bound field inside your detailsview on your aspx page.
<myTagPrefix:myBoundField MaxLength="255" DataField=""
HeaderText="" SortExpression="" />
no comments
Posted by elberon5
Thu, 08 Feb 2007 22:37:00 GMT
I needed to group data in data grids with summaries and headers. I found excellent example code for it here.
This is definitely the quick and dirty way to do it. I would rather have used some form of reporting but i haven't ventured into that realm of utility yet with my current project. Any suggestions or articles for this would be awesome. I was thinking about jasperreports and ireports but thats mainly geared towards java users.
Posted in Asp.Net | no comments