I made a web site with VS2010 and publish it on IIS7.
But when I publish this on the server, I get this error ::
Could not load file or assembly 'App_Code' or one of its dependencies. The system cannot find the file specified.
Anyone has an idea about what could be causing this?
Please help me :(
ShweNannThuThursday, November 01, 2012 7:44 AM
You may not have a license to install the application called by App_Code. For example if your code was using the Excel Application and there wasn't a license on the Server for Microsoft Office you may get an error like the one you are getting. The publish application doesn't deploy application and files that are put into a project folder. To deploy files and application not part of a project you have to make a ZIP file containing these files and the visual Studion Project. Then you have to unpack the ZIP file on the installation computer and run setup.exe.
jdwengThursday, November 01, 2012 9:03 AM
My connection string is
string connectionStr = @"Data Source=.\sqlexpress;AttachDbFilename=C:\Program Files\Microsoft SQL Server\MSSQL10.SQLEXPRESS\MSSQL\DATA\DBYDining.mdf;Integrated Security=True";
I didn't use Access ...
This site is smoothly running via web application in VS 2010 IDE ...
But not available in IIS after web publish to that :(
Shwe Nann ThuThursday, November 01, 2012 9:21 AM
where is SQLexpress installed? (@"Data Source=.\sqlexpress). The first period is using a default folder. Try changing the sqlexpress to be a full pathname. The code is expecting sqlexpress to be in the visual studio project folder. The visual Studio publish will not deploy files and applications just randomly placed in the project folder(s).
jdwengThursday, November 01, 2012 9:33 AM
I think the problem is with an access priviledge. The database file itself may be in a folder your visual Studio Application doesn't have access to. You may want to try running your application with admin priviledge. You may have to make the folder shared.
Also your connection string may need to contain the login information for the database. See webpage below for different connection strings. Use a connection string the contains the account and password. The pop up login windows may not work with a visual studio application.
If you plans are to access the database remotely I would set up a IP address (or URL) to connect to the database.
jdwengFriday, November 02, 2012 9:54 AM