How to Backup a webservice? - c#

The problem is I reinstalled my computer and the backup didn't work so now all my sourcecode is gone... But my webservice is still running on a webserver.
When I upload the new website the old site will be deleted, so how can i backup the webservice and make it a part of my new website?
In the bin folder of the webserver there is some strange name files like App_web_cjcpmkr8.dll,
can I just download these files and .asmx files? Isnt there then missing a link between the files? How can I see which .asmx files uses which .dll files?

Unfortunately they're all compiled- depending on your site's config, there will be either one assembly per page or per directory. You can download all the DLLs and decompile them through reflector- the decompiled class names should help you match them up with the corresponding markup, but you'll still have some reconstructive surgery to do.

The magic link between the asmx and the dlls lies in the name of the bin folder. IIS will automatically look for dlls in this folder. You should be able to deploy your web service on a new web server by just copying the files. I recommend that you try to set up a copy of the service on a new web server, before you delete anything.

If this is critical data get a service to try and get your files back. If not then moving forward invest in an online backup solution / source control utility.
This will save you tons of time when this happens again. I use source control on a remote server combined with a subscription to Carbonite locally to ensure that I don't lose that precious data; both the data checked in and the data that I'm currently working on. It's Iike $45 a year and well worth it.
As for your data I'm sorry that you've lost it. I'm sure you’re not the first to have this happen.

Related

ASP.NET website in production goes down after while (Could not load file or assembly...)

I have problem with web site which is made in asp.net, in dev everything works fine, but since I published it to a server, I faced next issue :
After some time some items appeard in my folder called "Temporary ASP.NET Files" and I realized when there is few stuffs web site goes down and it shows this screen:
And what I saw in my TEMP folder was next:
AND TEMPORARY SOLUTION WAS TO DELETE FILES IN THAT FOLDER BUT AFTER WHILE THEY ARE AGAIN THERE AND SITE GOES DOWN.
I TRIED WITH PREVENTING USER TO WRITE THAT FOLDER BUT THAN I GOT ANOTHER ERROR WHEN I TRY TO ACCESS MY WEBSITE, SOMETHING LIKE :
...can not write to ... folder..
Thanks guys,
And kind of suggestion will be really great!
Thanks!
You have to add the XXXXX.dll files to the bin folder on your server.
Some times (I don't know why) some DLLs are not part of the project and you have to copy manually. If the file(s) already exists, you can replace the file with your local DLLs.
Check:
1. Project Framework VS Application pool.
2. Check all Dll's if include and its framework too.
3. Check eSavez_Servis Framework.
Just simulate your problem one by one.

Is there a way to block/delete/hide a small portion of a .dll file that is causing my .aspx page to break?

I have an asp.net website on a HostGator shared windows server (set at medium trust) that uses the Amazon Web Services. It uses a .dll file called Microsoft.Web.Services3.dll
I do not know how .dll files work, but somewhere inside, there is an instance of System.Reflection that requires a trust level full. This is the only line that is breaking my website and yet I need the .dll to get the Microsoft.Web.Services3 namespaces imported.
Does anyone have any experience with .dll files that can help me get past this problem? I am happy to provide any extra information that might be useful!

Deploying a Click-Once Application

I am trying to deploy my application to be downloaded from my website. It is written in .NET 4.0. I think I have it on my server but I am not sure? When I try to deploy it again I receive this message.
Here is the setting I have for publishing.
And as you can see from the website, nothing is there.
Im not the best with web stuff, so my question is what the heck am i missing.
More Info
So. I published it to the wrong location, but i found it.
Currently, your folder http://www.theinsanityelement.com/insanepin/download/ is empty. You have entered ftp://neshmet.dreamhost.com/ as target location - I guess this is mapped to http://www.theinsanityelement.com/ root. That means you should enter
ftp://neshmet.dreamhost.com/insanepin/download/
as publish folder location, or whatever path is mapped to your target URL. Then you can access the download page from
http://www.theinsanityelement.com/insanepin/download/publish.htm
You could also change the "Deployment Web Page" name to index.htm, then the following would also work:
http://www.theinsanityelement.com/insanepin/download/

Publishing ASP.NET vs. copying files

I want to know for sure if there are any possible issues for not publishing an ASP.NET solution.
In my company current policy (strangely) they just copy the web project dll, and needed references dlls, web.config and global.ASAX and image files over the existing ones on the IIS web server(Virtual Directory is created).
Do you see any issue with the above?
Your feedback is greatly appreciated.
Don't really see a problem with this. It's sort of what we do. We publish to a folder - any folder, check the web.config against live, then zip it up. We then create a change request, referencing the zip file & pass this to the hosting team to deploy.
This works great for us, but then everyone has different views & circumstances. I don't really see it as a technical issue, but more of business process issue.
It used to be that you copying files was not good enough, because you needed to create a virtual directory/Application within the IIS configuration system for your applications. Recent versions of IIS allow you to handle this entirely within the app.config, and so it's much less of an issue.

What files do I upload in a C# Web API project?

** Dumb questions alert **
I created my first Web API project. I would like to test it on my web host, but I can't figure out what files to upload. I tried to upload everything from the HelloWorld folder, but I get a 403 "Access is denied" error when I attempt to access the files.
Once I upload the folders/files, how do I access them? Do I have to navigate to the Root > Views > Home > ... ?
Folder Structure
HelloWorld
HelloWorld
_UpgradeReport_Files
1 css, 1 xslt, 4 pngs
HelloWorld
All of my folders and files
This is what I tried to upload
packages
A lot of ASP and JQuery folders
Thank you for your help.
I think you have two separate problems here: knowing what files to deploy and getting the permissions correct so that you can access them.
In general, the files you will need to deploy are all of your static files (images, CSS, Javascript, HTML), any .cshtml/.aspx/.ascx/.asax files, and Web.config. However, the easiest (and best) way to know what files to deploy is to use Visual Studio's publishing mechanism. Go to Build->Publish, and publish to a local directory. Open that directory, and you'll see all the files you need to deploy.
As far as the second problem, that's more complicated. The solution depends on the version of IIS, but the basic upshot is that you need to give the correct user access permissions to your file. Depending on your version of IIS and how it's confusing, it will either be IUSR, IIS_IUSRS, or NETWORK SERVICE. Try Googling for "file permissions IIS ".

Categories

Resources