Does anyone knows how to do directory browsing using WCF and app.config file.
I tried doing
<system.webServer><directoryBrowse enabled="true"/></system.webServer>
but it did not helped. I need to make one directory within my Server available for users to download their files and I am implementing self hosted WCF services. I can share the files using IIS but it would be good if I can do it from WCF alone.
Directory browsing is a feature in IIS. IIS makes it available; when you use WCF self hosting, you don't have all of those options unfortunately. But it's possible to make a folder in your self-hosted folder structure a virtual directory in IIS so that they can get it there instead, if a hybrid is an option.
A possible way to achieve that is to also self host Katana.
Related
I have a folder on Amazon Web services and I want to transfer it to ASP.NET Server.
The Folder has huge size and I have a limited internet capacity so I can't download it and re-upload it via ASP.NET Web Forms.
so is it possible ? and How could I do it ? or What I should search for this ?
P.S: as I searched all I found was the other way around and I didn't quite understand it.
If you have folder on EC2 you can do scp [unix command to copy files from Linux to linux]
if you have it on S3; you can expose it as public folder; and then on Azure you can download it using wget/curl
I found a service that do the exact thing I want via FTP.
As the user registers two FTPs and he can copy/migraine the files/folders you want from one to the other.
Multcloud: Manage, migrate, transfer, copy, and move files between any cloud storage services.
I'm building a site for SaaS.
I'd like to distinguish sites by Domain name to use same contoller.
The reason why I want to make multiple IIS Application is, There are tons of HttpContext.Current.Application in Application_Start() and OnActionExecuting(). And It should be isolated by domains.
My questions are :
Is there any solution for multiple IIS Application using same C# MVC controllers?
If not, Is there other container instead of HttpContext.Current.Application?
Or, Is there other solution that is more elegant, efficient, or effective?
What I tried for creating multiple IIS Application are :
Setting same path.
Set only bin directory to same path as virtual directory
However, Nothing works.
I Hope this is helpful
Windows Server 2012 / IIS 8.5
VS 2013 / C# MVC5 / .Net Framework v4.5.0
Thank you.
Is there any solution for multiple IIS Application using same C# MVC controllers?
Yes.
IIS7 - How do I use the same physical path for different domains?
Can I configure IIS to use the same physical path for different sites but use custom web.config
If not, Is there other container instead of HttpContext.Current.Application?
Or, Is there other solution that is more elegant, efficient, or effective?
It is possible to have multiple domains pointed to a single web application. For more information take a look at IIS Bindings
Hello I am new to web services using WCF,how can I read files stored in a local directory inside my WCF application, I want to be able to read files inside my service application into my client application
I do not want to download files but view them In my client web application, I tried using HttpContext.Current.Server.MapPath(path) but my client website states directory not found since it is looking on local directory of the website
Thank you.
reading file in WCF service is just like other projects.
you can use File.ReadAllBytes or File.OpenRead.
note: you have to set appropriate permissions.
In my organization, there is a process where in for every new website/application to be added into the IIS, we have to go through a 6 weeks complex process and waiting. Even after the process completes the team will not have access to IIS. We can only deploy the build files using TFS, web deploy etc.
I have initiated the process for my first application/site in the IIS. I wanted to know if there is a way I can avoid future request/process for new application, by making this upcoming application an application of applications :). Something like child applications. But remember I do not have IIS access. I still have access to my application's web config. I also have the freedom to manage URL structures/patterns.
Either by using multiple routes, multiple projects etc. Just thinking loud. My applications will be of type web api, mvc etc
Any crazy ideas? Thanks in advance.
You can have several application roots in IIS, which can be virtual or real directories, under the same site.
Those separate applications will have separate configs and will not inherit each other's settings.
You can access your apps under the same domain, or to be configured to use different domains
http://www.domain.com/app1, http://www.domain.com/app2
They can share the same app pool or be configured to use different.
Since you don't have an access to IIS, I'm not sure how would you configure the app pool or domain, but perhaps Microsoft.Web.Administration namespace will help doing this from code. It contains managed classes to manage all aspects of IIS, including the configuration . It can be used from .Net or from PowerShell.
Creating Sites and Virtual Directories Using System.DirectoryServices
Using IIS Programmatic Administration
I have just completed my first aspx/c# project using Visual Web Developer Express and consuming some custom controls and external web services. It runs fine on my development machine.
If I now want to test this on a shared hosting account, do I just upload all the files with the current project structure? Will there be any problem uploading the DLLs to a shared Windows hosting account? Anything I should be aware of or changes to be made to the code? Can anyone recommend a cheap and good provider (this is just for testing - no mssql required yet).
Thanks!
Does visual web developer have a "publish website" menu item under the Build menu?
If you want to pre-compile your site and publish it with all dependencies the easiest way I've found. You can then choose to publish it to either an FTP site or the file system. I usually choose the filesystem and then FTP it up myself to make sure I don't overwrite any config files.
If I'm working on a low volume site for a client and performance isn't a problem, I'll just upload my working directory right up to the server so I don't have to deliver the source code separately and I know they won't loose it.
Oh, and one other thing, if you don't configure it special, I would expect you will have to upload your site to the root directory of your hosting account. GoDaddy does have the ability to specify certain directorys as their own ASP.NET application. If you do that you can put your app in a sub-dir of your choosing.
-Al
It would depend on your website provider. You need to get one that supports the .NET runtime. Once you have that, then you simply upload your code and all should work. I personally use www.godaddy.com. You can see an example ASP.NET site hosted by them at www.chessbin.com.
I hope this helps.
Adam
The hosting companies may vary on what they require, but I would think a simple xcopy deploy would be sufficient for most. Here's a link to one that seems to have good prices (disclaimer: I have never used them)
http://www.reliablesite.net/v3/index.asp