Help required to begin new projecthttp://forums.asp.net/t/1380306.aspx/1?Help+required+to+begin+new+projectSun, 08 Feb 2009 14:14:13 -050013803062916466http://forums.asp.net/p/1380306/2916466.aspx/1?Help+required+to+begin+new+projectHelp required to begin new project <p>Hi All</p> <p>I am an asp developer with an experience of 8 years. I didnt bother to switch over to .net in early stages, and now it seems difficult for me to cope with it. </p> <p>I am basically unable to identify how to start the project, where to begin from, how to go about the database. The books that I try to read about asp.net do not relate it to classic asp. So I am unable to understand the correct approach. I have looked at various projects with source codes that are freely available and each has a seperate approach and none of them looks familiar to me.</p> <p>&nbsp;I have now downloaded the BeerHouse Project from the starterskit, and would like to request you guys to help me with the right approach to understand so that I can begin working on my projects. I have always worked on asp, so working in VB.Net would be easier for me, and may be this way I can later switch to c#, as I see all people are working in c#.</p> <p>All help is appreciated.</p> <p>Regards,<br> Sandy</p> 2009-02-04T18:36:23-05:002916650http://forums.asp.net/p/1380306/2916650.aspx/1?Re+Help+required+to+begin+new+projectRe: Help required to begin new project <p>&nbsp;The easiest way to learn from this starter kit would be to buy the book that goes with it:</p> <p><a href="http://www.amazon.com/ASP-NET-2-0-Website-Programming-Programmer/dp/0764584642/">http://www.amazon.com/ASP-NET-2-0-Website-Programming-Programmer/dp/0764584642/ </a></p> <p>That being said, this is definitely NOT a book or starter kit for those who are not somewhat familiar with ASP.NET already.</p> <p>You say that &quot;The books that I try to read about asp.net do not relate it to classic asp. So I am unable to understand the correct approach&quot;. You might want to look into Doug Parson's book to get up to speed on ASP.NET from classic asp:</p> <p><a href="http://www.wrox.com/WileyCDA/WroxTitle/Jumping-from-ASP-to-ASP-NET.productCd-0470391847.html">&nbsp;Jumping from ASP to ASP.NET </a></p> <p>It is only &#36;6.99 and is downloadable. <br> </p> 2009-02-04T19:56:48-05:002918640http://forums.asp.net/p/1380306/2918640.aspx/1?Re+Help+required+to+begin+new+projectRe: Help required to begin new project <p>Hello Lee</p> <p>Thanks for your help.</p> <p>I see you have provided me with 2 links. </p> <p>One is a book that you say use BeerHouse as an example site. But do you really think that this book would answer my questions as to how to begin etc. I have read many asp.net books, but found none of them answering my doubts. Like what kind of db objects I need to use when. There are 10 objects in .net for a single recordset in asp, but now where to use what is not answered anywhere.</p> <p>I have worked on small asp.net sites, but am not very comfortable working on it. Like I need to refer books all the time. Then if I need to rework on something, I would need to go over and check what way is it done already. Where as in asp the mind runs 1 way, and I know if some problem is occuring, where should I go and check.</p> <p>The second book might be helpful, but I see that its in C#, and not Vb. Do you have a copy of it, else I will have to look for it in local market (just incase I can find it) to have a preview of it.</p> <p>My question of where to start might look strange but believe me, for an asp developer who got so late to make the shift these are legitimate concerns. I cant start developing on a new platform and rollback everything to asp when I get stuck, believe me I had to do this once.</p> <p>Regards<br> Sandy </p> 2009-02-05T13:26:42-05:002918992http://forums.asp.net/p/1380306/2918992.aspx/1?Re+Help+required+to+begin+new+projectRe: Help required to begin new project <p>&nbsp;TheBeerHouse book is not a &quot;general&quot; book on the hows and whys of ASP.NET. And as I stated, you won't find the book or this starter kit (or any starter kit, for that matter) very useful if you don't have a fairly solid understanding of ASP.NET already.</p> <p>The second book is an eBook (PDF only) and as I said, it is only &#36;6.99. I don't have the book, but you can contact the author (Doug Parsons) at the Wrox forums (p2p.wrox.com) and ask him anything you want.</p> <p>Another book I think is really great for beginners is <a href="http://www.murach.com/books/avb8/index.htm"> Murach's ASP.NET 3.5 Web Programming with VB 2008</a>. It starts you out at the VERY beginning of ASP.NET and will take you quite a long way.<br> </p> 2009-02-05T15:33:23-05:002919529http://forums.asp.net/p/1380306/2919529.aspx/1?Re+Help+required+to+begin+new+projectRe: Help required to begin new project <p>Thanks Lee for your support. </p> <p>I have now downloaded Asp.Net maker, and have tried to generate a basic website. But I see, that this is basically to generate the admin section of the sites. I see that they have created hundreds of files, not sure if in normal working we should create so many files, so many classes or not. But I have started with the Masterpage concept, and have got a fair understanding of it. I will now try to incorporate Login controls in masterpage and try to work with it.</p> <p>&nbsp;Sandy</p> 2009-02-05T18:53:45-05:002919587http://forums.asp.net/p/1380306/2919587.aspx/1?Re+Help+required+to+begin+new+projectRe: Help required to begin new project <p>&nbsp;Never heard of Asp.Net Maker, so I can't really say...<br> </p> 2009-02-05T19:15:46-05:002921397http://forums.asp.net/p/1380306/2921397.aspx/1?Re+Help+required+to+begin+new+projectRe: Help required to begin new project <p>Hi</p> <p>&nbsp;Its a code generation software, that autogenerates the admin section for a given database. </p> <p>&nbsp;As I said, I started with the membership components of .net yesterday, and I got stuck, and refered the Apress Beginning ASP.NET 3.5 in VB 2008 From Novice to Professional, and it seemed a little helpful. But I see this was a small topic, so lets see how it comes up in advance topics.</p> <p>&nbsp;What is your opinion on this book, Any idea?</p> <p>Sandy </p> 2009-02-06T12:29:30-05:002921569http://forums.asp.net/p/1380306/2921569.aspx/1?Re+Help+required+to+begin+new+projectRe: Help required to begin new project <p>&nbsp;I haven't read that book, but the few other Apress books I've seen are pretty decent, if a little on the dry side.<br> </p> 2009-02-06T13:23:18-05:002922110http://forums.asp.net/p/1380306/2922110.aspx/1?Re+Help+required+to+begin+new+projectRe: Help required to begin new project <p>&nbsp;Hey, I actually happened to stumble onto something really, really interesting today:</p> <p><a href="http://msdn.microsoft.com/en-us/beginner/default.aspx">http://msdn.microsoft.com/en-us/beginner/default.aspx </a></p> <p>It is a series of really easy tutorials free from Microsoft. There may be one or two in there you would like...<br> </p> 2009-02-06T16:57:34-05:002922618http://forums.asp.net/p/1380306/2922618.aspx/1?Re+Help+required+to+begin+new+projectRe: Help required to begin new project <p>Hey Thanks Lee.</p> <p>This new link seems to be very helpful, they have many chapter from the 'For Dummies' series, there are missing chapter also, but alteast I am getting some of what I want.</p> <p>I have a question about the membership in asp.net from what I have read so far.&nbsp;I have created a users table in mysql and have linked the membership to it correctly. I need a mysqlrolesprovider&nbsp;to use roles with this, so will be looking further for it. From so far what I have read, I see that we have a few ways to make navigation for the site:</p> <p>1- Use the sitemap. Problem with this is that if I want a seperate menu for anonymous user, and the logged in ones. I see that we can use roles to overcome this. But I am not sure if it really works correctly. Like if a user types the url of a secured page directly, will he get access to it or will still be stopped.<br> 2- Create the menu dynamically, based on user when the page loads.</p> <p>Now another issue, we have a details.aspx page this can be used to show data for both anonymous users and logged in ones, based on the parameters with it. So how does my membership help me with this, or in such cases we use the old asp approach of checking the user roles dynamically on the page and showing the content accordingly. I read about the way to use WAT to secure folders, but practically for a dynamic site, it sounds unrealistic.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </p> <p>I know above questions might sound simple and funny, but I am really appreciating your help and support to me.</p> <p>Sandy</p> 2009-02-06T20:25:54-05:002922691http://forums.asp.net/p/1380306/2922691.aspx/1?Re+Help+required+to+begin+new+projectRe: Help required to begin new project <p></p> <blockquote><span class="icon-blockquote"></span> <h4>schadha</h4> <p></p> <p>I have a question about the membership in asp.net from what I have read so far.&nbsp;I have created a users table in mysql and have linked the membership to it correctly. I need a mysqlrolesprovider&nbsp;to use roles with this, so will be looking further for it. </p> <p></p> </blockquote> &nbsp; <p></p> <p>Yes, you need a roles provider that would work with mySql. However, I am sure there is already one out there somewhere you can grab.</p> <p>&nbsp;</p> <blockquote><span class="icon-blockquote"></span> <h4>schadha</h4> <p></p> <p>&nbsp;From so far what I have read, I see that we have a few ways to make navigation for the site: </p> <p>1- Use the sitemap. Problem with this is that if I want a seperate menu for anonymous user, and the logged in ones. I see that we can use roles to overcome this. But I am not sure if it really works correctly. Like if a user types the url of a secured page directly, will he get access to it or will still be stopped.<br> 2- Create the menu dynamically, based on user when the page loads.</p> <p></p> </blockquote> &nbsp; <p></p> <p>I would go with option 1. </p> <p>The roles filtering works very well with sitemaps, but you are correct in that is only hides the nodes; it does NOT actually restrict non-authorized users from accessing a page directly. </p> <p>For that, you have to explicitly secure your files and/or directories in web.config using the &lt;location&gt; element. The &lt;location&gt; element lets you allow or deny access to any defined location in your file structure based on identity (userName), authorization (role), and authentication (whether or not a user is logged in).</p> <p>&nbsp; </p> <blockquote><span class="icon-blockquote"></span> <h4>schadha</h4> <p></p> <p>&nbsp;we have a details.aspx page this can be used to show data for both anonymous users and logged in ones, based on the parameters with it. So how does my membership help me with this, or in such cases we use the old asp approach of checking the user roles dynamically on the page and showing the content accordingly.</p> <p></p> </blockquote> &nbsp; <p></p> <p>How you accomplish scenarios like this depend on the granularity you need to control.</p> <p>As I said, for simple allow/deny access to a whole page, you can use the &lt;location&gt; element.</p> <p>For situations such as you've described, where actual access to the page is allowed to everyone, but some page contents may be shown or hidden based on authentication or authorization, you can look into using a LoginView. A LoginView lets you use templates to define how a page or a section of a page will look (and of course, what data it will contain) based on authentication (whether a user is logged in) and authorization (if they are logged in, do they belong to the correct role?).</p> <p>Sometimes you need an even finer level of control; for example, if you have a GridView with record editing buttons in each row. You would want the edit buttons to show to, say, Administrators, but not to normal logged in users or anonymous users. In cases where the functionality can't be easily broken down by page section, you can use the classic ASP-like way of dynamically checking the role(s) of the currently logged in user:</p> <p>&nbsp;</p> <pre class="prettyprint">MembershipUser currentUser = Membership.GetUser(); if (currentUser.IsInRole(&quot;Admin&quot;)) { // do or show something here }</pre>&nbsp;&nbsp; <p>Questions do not sound funny in the least. I've heard way funnier. [:D]<br> </p> 2009-02-06T20:58:01-05:002922713http://forums.asp.net/p/1380306/2922713.aspx/1?Re+Help+required+to+begin+new+projectRe: Help required to begin new project <p>Thanks Lee for a quick reply.</p> <p>&nbsp;I will play around with&nbsp; this much for some time, and will bug you again with something new soon. I hope you wont mind, and I am not disturbing or taking too much time of yours.</p> <p>Sandy </p> 2009-02-06T21:08:28-05:002923741http://forums.asp.net/p/1380306/2923741.aspx/1?Re+Help+required+to+begin+new+projectRe: Help required to begin new project Hi, <br> <br> I was working with membership having found the MySQLMerbershipProvider and MySQLRoleProvider. Till yesterday, my users got created with the CreateUserControl, but today suddenly I started getting this error: &quot;Your account was not created. Please try again.&quot;. No user is getting added to the database, although I am still able to login using the Login control and users created yesterday. On checking further I could see that an exception was getting raised with following details. <br> <br> <pre> An exception occurred communicating with the data source. Action: CreateUser Exception: MySql.Data.MySqlClient.MySqlException: Failed to read auto-increment value from storage engine at MySql.Data.MySqlClient.MySqlStream.OpenPacket() at MySql.Data.MySqlClient.NativeDriver.ReadResult(UInt64&amp; affectedRows, Int64&amp; lastInsertId) at MySql.Data.MySqlClient.MySqlDataReader.GetResultSet() at MySql.Data.MySqlClient.MySqlDataReader.NextResult() at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior) at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader() at MySql.Data.MySqlClient.MySqlCommand.ExecuteNonQuery() at MySql.Membership.MySqlMembershipProvider.CreateUser(String username, String password, String email, String passwordQuestion, String passwordAnswer, Boolean isApproved, Object providerUserKey, MembershipCreateStatus&amp; status) in C:\Inetpub\wwwroot\testapp\App_Code\MySqlMembershipProvider.vb:line 468 For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp. </pre> <br> <br> I have now replaced the provider with a new one with a little different struc, and it is working again. I am not sure what and where could the problem be, as yesterday the previous provider worked to add records to db. <br> <br> Another issue that I am facing is, that when I run my site from VWD (express) in IE, the port in address bar is 4 less then what development server is running at. This is the same in FF, with an added www. and .com to the localhost (http://www.localhost.com:4995/testapp/)<br> <br> Please suggest <p></p> <br> <br> Sandy 2009-02-07T11:25:17-05:002923936http://forums.asp.net/p/1380306/2923936.aspx/1?Re+Help+required+to+begin+new+projectRe: Help required to begin new project <p>May I suggest that, instead of asking a string of unrelated questions in a single thread, that you ask each new question in a new thread? That way, more people will see it, which means you have a much better chance of getting an answer. That will also help those in the future who may be searching for the same answer.</p> <p>Also, when a thread is answered, you should &quot;mark&quot; the relevant post as the answer. <br> </p> 2009-02-07T14:00:42-05:002925260http://forums.asp.net/p/1380306/2925260.aspx/1?Re+Help+required+to+begin+new+projectRe: Help required to begin new project <p>Thanks Lee for all your help. I have marked one of the threads as answer.</p> 2009-02-08T14:14:13-05:00