Publishing ASP.Net Web application with SQL Server database installation
My requirement is to deploy an ASP.NET application in which I have a core library class project, service layer and a UI layer, using SQL Server database as backend.
My client needs to deploy it using some MSI or EXE, in which he / she should able to customize the installation to IIS and h开发者_JS百科is SQL Server.
What I want to say, when I execute the EXE, it will ask me the basic requirement for the IIS like server name, virtual directory name, app pool etc , then automatically deploy it there. Now it should also ask the same for SQL Server database installation like server name, authentication, database name and so on....
I have tried but I can manage to deploy ASP.NET app not able to customize the SQL Server installation. Also tell a feasible solution, as my database size is around 6GB. What will be optimized way to create a installer for that?
I once had to do something similar but my database was much smaller.
I scripted out my database into T-SQL statements for its creation from scratch and stored those in a text file.
I then wrote a .NET windows app that would prompt the user for SQL Server network location and credential information. This .NET application had the database creation SQL text file included in the executable as a resource file, and would connect to the specified SQL Server and execute the commands in the text file one by one. I was able to read the text file and parse commands out by delimiting on the keyword "GO"(linebreak).
精彩评论