I made an ASP.NET web site using visual studio 2012. I registered a free domain and now I need to upload the project using for example FileZilla. Can you tell me which files exctly should I upload and do I need to set a starting page in my project or I need a Default.aspx page in it. I also have an MSSQL database. Any suggestions how to upload it?
If you can publish your code using this - right click on project , select publish, choose filesystem , and then save published code to target file system and then copy that directory to required domain using FileZilla. Also you can directly copy solution project , but it is recommended to host published code.
You can set startup page using web.config - Set Default Page in Asp.net
Regarding DB thing - you need to make sure, required domain has MSSQL, if that has, then copy required DB and attach to DB server, extract connection string ( DB server address, DB name , credential) and update that in web.config of hosted website.
Related
Is it possible to rename/move or delete files from a web application (ASP.Net MVC) that are on a server folder just like how you would do it locally? I would want the user to be able to upload say 30 files (from a scanner auto-feed) into a temporary folder on the server (cannot save it locally due to data security) and then allow the user to be able to rename /move before uploading them onto Azure blob storage.
I saw few examples - jquery file tree seemed good but not sure if it allows rename and moving. Please suggest solutions for working with the server folder. I intend to delete the server folder after I am done transferring files to Azure. TIA.
Yes, you can do this by giving the USER that is running the ASP.Net application (defaults to IUSR) permissions to write to that folder.
Be very careful though, as you're potentially opening your website for abuse when doing this.
See: https://www.iis.net/learn/get-started/planning-for-security/understanding-built-in-user-and-group-accounts-in-iis for how IIS users operate.
I am new to SQL Server databases. I used a SQL Server database in my website (I add it to my project by add new Item and now it is located in a App_Data folder). I can show the needed information of it in a gridview on my localhost but when I upload it on the web hosting server, I can not access it.
What is wrong with it? You can see it here: http://www.kaj.somee.com/SL.aspx
I'm using asp.net 2010 and vb.net
There is the error. See your excerpt (per comment). Do you really have your app_data folder in path
AttachDbFilename=C:\Users\Javad\Desktop\Sharj\App_Data\ShDB.mdf
Does this path really exist in your hosting machine. I believe NO and in that case Change that path accordingly.
I have one web site and I want to upload it on server and i also want to upload the ms sql database with that web pages. Please tell me how to upload it on web server....
This is a rather generic question because there could be a lot of different problems and differences, but generally, you would take a backup of your server first. Here is some general information on that:
http://msdn.microsoft.com/en-us/library/ms187510.aspx
Then log into your hosting provider, create a database using their tools, and restore your database backup to that new hosted database.
Next you would change where your database config in your files is pointing to the new database, then use an ftp client like Filezilla to ftp into your web server. The hosting provider should be able to give you the username and password. Upload the web pages / files to the public directory (usually /public or /htdocs or something along those lines).
I am using a 3rd party component which creates settings files based on hard-coded file paths i.e. they are compiled into the DLL e.g.
%APPDATA%\Vendor\Settings.ini
I have created a few console/service applications that use this and work very well. However, I am now trying to use a similar approach via my ASP.NET MVC web application and the settings file never seems to write out!
Usually if the application is running under my acconut for example the file would be written to somewhere like:
C:\Documents and Settings\James\Application Data\Vendor\Settings.ini
So I thought if the website AppPool was running under the same account the file would be saved to the same place....However, it never appears. The account is an admin account running under Windows server 2003.
Any ideas?
Thanks.
Have you checked to see if the settings file is created in the App_Data folder in the web application? If not, could you put an existing settings file there and see if it uses it?
It's not about the webpool account, it's about guest user's account.
Go to the properties of your site in IIS, Directory Security and in the anonymous access click on the Edit button, there you'll see wich account is been used when someone access your site.
Couldn't find a solution to this, so I decided to develop a local WCF service (which would create the settings file in the correct directory path) and just accessed it via my web application.
I have a ASP.NET intranet application that has a document library section. The user can click on a link to a MS-Word document that resides on the server and can then edit the document if required within the browser (IE).
The problem is that when they come to save their changes it needs to write it back to the server but instead wants to save it on their local system.
Any ideas how I can get it to save back to the main server ?
Thanks in advance.
you need to upload the file back to the server.
Is this a internet or intranet application? if intranet you could save directly to \\myServer\myFolder\...
If it's a internet application, so the end user does not access to the server files directly you need to create a Office Add In (using Visual Studio Tools for Office), called "Save to Server" and that will run "http://www.mydomain.com/updatefile.aspx" and that page will do a Update.
remember, Update with a filename diferent from the original, and if the update was ok, then delete the old, and rename the new (or give the user a version system and rename the file on the server to [myFile]_[currentDate].docx for example.
links:
How to upload a file to a Web server in ASP.NET by using Visual C# .NET
The link to the word document can be a file:// url.
Using this method the user can open the file directly on the share.
Assuming your intranet applicaiton supports writing back to the server, you would need to give the account that the web application runs as permission to write to the folder the documents are stored in, unless it is using impersonation then the users it is impersonating would need ther permissions.