Results 1 to 15 of 15

Thread: From Windows Forms app to Web

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Mar 2005
    Posts
    147

    From Windows Forms app to Web

    Hi all - just wondering - I have now completed my windows form app (connecting to an SQL server) - what would be the best way to go about creating a similar web app - can I reuse my datasets or will I just have to start from scratch with a new project?

    Thanks,

    Steve.

  2. #2
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: From Windows Forms app to Web

    You can reuse your code logic, such as your classes an subroutines for retrieving/updating data. You will have to create the UI from scratch in HTML though.

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Mar 2005
    Posts
    147

    Re: From Windows Forms app to Web

    Ah ok thanks - one thing though - I've used integrated security for my connection to a sqlserver - do yo uknow offhand why I can't connect using the same string in Dreamweaver? I know it's not in the right forum but maybe you know?

    Thanks.

  4. #4
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: From Windows Forms app to Web

    Very few people here would know the reason for that, since most of us use Visual Studio 2003.

    But then we might be able to help. Are you creating the connection through some wizard or are you doing it through code?

  5. #5

    Thread Starter
    Addicted Member
    Join Date
    Mar 2005
    Posts
    147

    Re: From Windows Forms app to Web

    OK if I use VS - I don't understand how to go about it - I select "New Project"

    and select ASP.Net Web Application?

  6. #6
    Frenzied Member FishGuy's Avatar
    Join Date
    Mar 2005
    Location
    Bradford UK
    Posts
    1,708

    Re: From Windows Forms app to Web

    yes thats correct.

  7. #7

    Thread Starter
    Addicted Member
    Join Date
    Mar 2005
    Posts
    147

    Re: From Windows Forms app to Web

    OK but where do I store my app? I mean - in dreamweaver, I create a directory on my dev machine, point to a dir on my server, edit the files then upload them to my server and test...

  8. #8
    Frenzied Member FishGuy's Avatar
    Join Date
    Mar 2005
    Location
    Bradford UK
    Posts
    1,708

    Re: From Windows Forms app to Web

    You need a copy of IIS running on a server or local host, when you create your project the default location is localhost, this is where the directory is created. The main difference here though is that .net files are not uploaded like asp. you can develop on your local host then create an install project to deploy your web app on the live server.

  9. #9

    Thread Starter
    Addicted Member
    Join Date
    Mar 2005
    Posts
    147

    Re: From Windows Forms app to Web

    I can't seem to get my sqlconnection working properly - am I missing something obvious here?

  10. #10
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    Re: From Windows Forms app to Web

    Quote Originally Posted by FishGuy
    You need a copy of IIS running on a server or local host, when you create your project the default location is localhost, this is where the directory is created. The main difference here though is that .net files are not uploaded like asp. you can develop on your local host then create an install project to deploy your web app on the live server.
    this is only if you have direct access to the webserver. Lots of people use 3rd party hosts, in which cause you still need to FTP your application up to the web.

  11. #11
    Frenzied Member FishGuy's Avatar
    Join Date
    Mar 2005
    Location
    Bradford UK
    Posts
    1,708

    Re: From Windows Forms app to Web

    To be honest steve I have never been able to get Integrated Authentication working and have always had to hard code the connection. To get round this on sql server we set up an user called aspclient with the correct permissions. This allws the sql connection to log use thos credentials instead of admin. My explanation for why this works is that the sql server doesnt recognise you as a person because it is the web server making the calls, the webserver therefore needs an account it can log in as.

    Thats my workround.

    perhaps someone with more knowledge could help you further if you posted your connection string also there is a asp.net forum.

  12. #12

    Thread Starter
    Addicted Member
    Join Date
    Mar 2005
    Posts
    147

    Re: From Windows Forms app to Web

    Ah ok - it's no probs - I'm going to use Dreamweaver as I don'tneed to to anything fancy - just a few browse pages.

    Only thing is is that it doesn't work either - my connection string logs on as sa with a password and then I get a runtime error when I try to use a dataset - can't really see what the exact error is though - very strange.

  13. #13

    Thread Starter
    Addicted Member
    Join Date
    Mar 2005
    Posts
    147

    Re: From Windows Forms app to Web

    Ah I have it now - I'm using VS one thing is - I add a dataset and fill it - I can get a text box to display the number of records but cannot get a datagrid up like I can in a windows app - any ideas?

    Thanks.

  14. #14
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: From Windows Forms app to Web

    You can't "see" the error? Why's that? Are you visually impaired or does it give you some cryptic remarks?


    Or when an error occurs, do a pair of fingers come out of the monitor and poke you in the eyes?

  15. #15

    Thread Starter
    Addicted Member
    Join Date
    Mar 2005
    Posts
    147

    Re: From Windows Forms app to Web

    lol sorry - I meant to say there were no results in the datagrid - I have since found I have to use me.datagrid1.bind after I fill the dataset

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width