Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 6 years ago.
Improve this question
Is there any way to execute, get or create any local file by the user specific path? My intension is to create a folder in the user specific local path... something like Y:\newFolder if the user clicks a button in the View ASP.NET MVC. Sorry that I don't have any code sample but I really dont have any idea. Thanks and Greetings!
In a web application there is not actually any user, other than the IIS and the POOL that runs your site.
Now, you application can have users, that you allowed them to logged in, and then where you going to create their files and folders is up to you, and you only.
you can use this
HttpRuntime.AppDomainAppPath
to get your current application path, and from there you can add any folder base on your users.
Related
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 1 year ago.
Improve this question
I want to develop a console application using C# which gets the IIS Application Pool status information,whether its running or stopped.For this I referred check the status of IIS Application Pool which matches my requirement.
Can someone please clarify what is the purpose of Directoryentry class according to the above code?
Any help is appreciated.
Thankyou.
The Directoryentry class is used here to get IIS application pools and you need to pass username and password to access them.
These required username and password need to be specified in "appsettings.json" file.
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 1 year ago.
Improve this question
I'm developing a small app in winforms using dotnet 5 to upload files to a container in the azure portal.. by the way it's working fine, but now i'd like to develop a service to upload a folder (not a single file), but cant figure out how to do it. It's not like to upload files. Somehow it's different and I've been looking for it for so long but cant find a solution.
Does anyone have an ideia?
Cheers
If you are trying to upload an entire folder through your service programmatically, note that it is not supported.
Simply, you can create your blob called folder/1.txt for example, and it will work. No need to create a directory. So, to sum it up, you can create a folder like this and start uploading your files in that folder.
Check out Microsoft Azure: How to create sub directory in a blob container for more details.
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 6 years ago.
Improve this question
Is it possible to call an exe from a MVC site?
I've seen this link. (I'll try it tomorrow in the morning when I get in the office)
Stackoverflow link
However I wanted to know if I cam barking up the wrong tree.
I have a 3rd party app that provides us a stand alone exe. Instead of sending this exe to x amount of clients. I would like to keep that exe on my web server so I can control who can use the exe.
Is this is viable option?.
You might find the responses to this old question helpful. If you are trying to run an exe file within your application, I think this would be the approach to take.
If I have understood your question wrong, and you are trying to provide users with a link to download an application, or a link to launch an application that already exists on their computer, then you will probably want to look into the html <href> tag.
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 7 years ago.
Improve this question
I have some training modules which I want to load from my MVC site (SSL). I am trying run them as following but it does not load their css and images. Also I am not sure if it will let me to move to other html pages with in the same module by clicking the links on index.html.
Can anyone please suggest me a batter way of doing?
public ActionResult DisplayModule(string path)
{
return new FilePathResult(path, "text/html");
}
Thanks in Advance.
If CSS and Images are all under one HTML package, I don't think you will get that sort of flexibility with FilePathResult. Also with that you will struggle to get links working because if you click on links they will be relative.
I think if you add your e-learning modules as virtual directory to your web application in IIS, and then redirect directly, that will sort your purpose.
my Course
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
AFAIK attackers can overwrite files which have CHMOD values 777 on linux servers. Today my web site which created by myself using ASP.NET has been hacked. My Site.master page has been appended with lots of backlinks and there was a folder named as Sayers which has many html files (probably include search keys).
I could easily delete the folder and restore the original Site.master file.
I do not have SQL injection problem. Even if so I would have seen some additions or changes in the records. There is nothing. There are only changed files and added folder.
I have updated my FTP password. I am 100% sure that I do not use a third party extension. All the code is handmade (: So I want to know how to prevent this to be done again. Also what could be the vulnerability about the website. I also want to know if it is a server side problem or my problem.
I am using a hosting company's service. I use FTP (21), not secure.