Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Publishing a .Net windows Application on a LAN

  • 14-02-2011 11:11pm
    #1
    Registered Users, Registered Users 2 Posts: 2,054 ✭✭✭


    OK, So I'm in test mode here..

    I've developed a vb.net windows application that utilises a local sql server express db..

    Now I want to publsh/deploy this so I can install the App on another machine on the local (wireless) LAN and it will access the db on the developmnet machine (client / server..)...

    I'm assuming it publish as a file share..what do I need to insert as server name in the create publish process...?
    I've tried machine name\ sqlexpress but get an error telling me ...

    Error 1 Failed to connect to '\\LAP-CSD025\SQLEXPRESS\WindowsApplication3\' with the following error: Unable to create the Web '\\LAP-CSD025\SQLEXPRESS\WindowsApplication3'. The path '\\LAP-CSD025\SQLEXPRESS\WindowsApplication3' does not exist or you do not have access. The filename, directory name, or volume label syntax is incorrect.


    Any ideas??

    I'm just testing stuff out here ..

    Cheers :)


Comments

  • Registered Users, Registered Users 2 Posts: 375 ✭✭unknownlegend


    Try the computers DHX number if its available?


  • Registered Users Posts: 96 ✭✭Oisintarrant


    Why not use the exe in the deploy or bin folder, just cut paste it onto the other machine


  • Registered Users, Registered Users 2 Posts: 2,054 ✭✭✭Zipppy


    Try the computers DHX number if its available?
    Tried that :(
    Why not use the exe in the deploy or bin folder, just cut paste it onto the other machine
    Will that be able to access the sql Db on the (remote) development machine??


  • Registered Users, Registered Users 2 Posts: 1,686 ✭✭✭RealistSpy


    Why not use the exe in the deploy or bin folder, just cut paste it onto the other machine

    This is the easiest way to be honest with you. No port open required aslong as its a lan based connection. I actually just finished a project on this using MySQL server. You can also share the Database over WAN but that posses security issues.


  • Registered Users, Registered Users 2 Posts: 2,054 ✭✭✭Zipppy


    Tried that guys...couldnt connect o the remote SQL server..

    Obviously a network issue..

    Ive set up a workgroup on both machines, enabled file and print share...think Ive enabled sql to accept remote connections...

    Anything else I should look at??
    I reckon my local LAN over wireless is wrong somewhere as I cant map to it ...

    Ideas?


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 1,686 ✭✭✭RealistSpy


    Try this,

    Have two computers connected on the LAN then ping each computer's IP Address.

    What SQL server are you using? MySQL or Microsoft SQL?

    Do you have the right connection code in your app?


  • Registered Users, Registered Users 2 Posts: 2,054 ✭✭✭Zipppy


    RealistSpy wrote: »
    Try this,

    Have two computers connected on the LAN then ping each computer's IP Address.

    What SQL server are you using? MySQL or Microsoft SQL?

    Do you have the right connection code in your app?

    Cheers will try ping later..

    Im using sql server express 2005 and VS 2005

    Connection code works on local machine..
    Dim strCon As String = "Data Source=LAP-CSD025\SQLEXPRESS;Initial Catalog=testLAN;Integrated Security=True"
    Dim myConnection As SqlConnection = New SqlConnection(strCon)

    Zip


  • Registered Users, Registered Users 2 Posts: 1,456 ✭✭✭FSL


    Looking at your connection string you are using a DSN.This DSN must exist on the remote machines pointing to the sqlserver. You are using integrated security so the remote user must be added to the logins on the SQL Server and given access to the appropriate database.


  • Registered Users, Registered Users 2 Posts: 2,054 ✭✭✭Zipppy


    FSL wrote: »
    Looking at your connection string you are using a DSN.This DSN must exist on the remote machines pointing to the sqlserver. You are using integrated security so the remote user must be added to the logins on the SQL Server and given access to the appropriate database.

    Hi I can add remote user to sql logins however how do I get around the DSN bit? If I was to connect DSN less how do I configure connection string?? Sorry for all the questions but I am grateful for replies :) Zip EDIT: could I connect using server IP address in connection string rather than server name? Im using the machine name as server name .. nit sure if that's correct?


  • Registered Users, Registered Users 2 Posts: 1,456 ✭✭✭FSL


    You need to create the DSN on the remote machines the same as you created it on the host machine.


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 2,054 ✭✭✭Zipppy


    FSL wrote: »
    You need to create the DSN on the remote machines the same as you created it on the host machine.

    Sorry for being a numpty but...I dont understand.. All I did on host was create Db and then link to it in connection string.. I cant create Db on remote machine as I want remote to update Db on host.............


  • Registered Users, Registered Users 2 Posts: 683 ✭✭✭JazzyJ


    That connection string is not using a DSN. It's pointing to the SQLEXPRESS instance on server LAP-CSD025.

    I don't know much about publishing of applications, but it looks like that's where the problem is rather than the pointing of the application to database.

    It looks to be trying to publish to "\\LAP-CSD025\SQLEXPRESS\WindowsApplication3". Presumably thats a share that you want to publish to? I'd say you want to try and change the location of the publishing to where you have a share created something like \\LAP-CSD025\ApplicationShareName.


  • Registered Users, Registered Users 2 Posts: 1,456 ✭✭✭FSL


    Sorry was thinking VB not VB.net datasource in VB refers to a DSN. For a DSN less connection you provide the driver name and the server name.


  • Registered Users, Registered Users 2 Posts: 2,054 ✭✭✭Zipppy


    Thanks guys but I'm still kinda lost here...reckon I can have a bash at DSN less with provider name but really think that issue is also what jazzyj says in that I'm attempting to publish from Db rather than App???


  • Registered Users, Registered Users 2 Posts: 683 ✭✭✭JazzyJ


    Zipppy wrote: »
    I'm assuming it publish as a file share..what do I need to insert as server name in the create publish process...?
    I've tried machine name\ sqlexpress but get an error telling me ...

    As I've said before I'm not that au fait with publishing, but I think what you need to put in here is the location on your network where you want the application to run from. Have you tried creating a share on your server. Then try to publish to that. (e.g. \\LAP-CSD025\ApplicationShareName).

    Publishing should not have anything to do with the database as all you're doing is publishing the application. Once published, when you run the application it will then try to connect to the database.


Advertisement