Asp.net CkFinder separate folder for different client issue - c#

I am working on the latest ckfinder 3.4.2 and try to integrate it with my current system built by Asp.net WebForm..The backend for CkFinder would be amazon S3. I can get this working with the static configure file.
However my website got different client. I can get the client_Id after user login in. I would like to set different folder for different client so they can't see each other's folders.
Is there anyway I can set the folder structure like {root}/{clientId}/image
dynamically. So every client got a base folder name with their client Id.
One more thing is I am not using ckeditor and the authentication is not based on OWIN as well. I just try to integrate the ckfinder to the existing system.
Any help would be really appreciated.
Thanks

Related

Deploying ASP.NET Core Web API and ASP.NET Core with Angular in a subfolder (1&1 Windows Business Hosting)

I've acquired a 1&1 Windows Business Hosting which allows to deploy ASP.NET Core applications (so yeah, I have no access to IIS solutions of building as application stuff or that kind of things I've seen in other posts). I wanted to deploy a web and an API in different subfolders within the 1&1 server I've acquired.
What I want to achieve is the following:
Imagine that my domain is https://myDomain. com.
If a user access directly that URL he should see a specific page of the Angular Web App. However, if the called is https://myDomain. com/api/controllerName it should do whatever I have programmed in that controller of the Web API.
I want to have the folder structure something like this:
But it is also valid if I manage to get it like this:
Is any of these two cases even possible to be done? If possible, how I should proceed for being able to do it? I don't have a lot of knowledge in these topics related to web deployment.
What I have managed to do up until now:
If I deploy just the ASP.NET Core Web API outside the subfolder it works with no issues. If I deploy just the ASP.NET Core with Angular outside the subfolder it also works. My issue is that I'm unable to get them both to work at the same time when at least one of them is in a subfolder.
Alternatives on how to achieve this are also welcome!
Thanks in advance :)
You can deploy ASP.NET Core Web API and ASP.NET Core with Angular in two folders as shown in the image below.
These two folders are virtual directories in IIS. If you want to specify which app to access by default, you can modify the rewrite rule in web.config under the wwwroot folder.

Installing Wordpress in a Sub Directory in windows server along with asp.net

I have deployed asp.net based website to domain e.g xyz.com.
I want to manage the blog site of the website via WordPress cms. So I have created a folder by the name of "blog" in the base directory and installed WordPress in it. WordPress installation is working fine on the local host. But when I try to access it via domain link xyz.com/blog it gives 404 error because every request is managed by asp.net MVC. I want to ignore the xyz.com/blog route not to be managed by asp.net MVC.
I am not sure where I should do that kind of configuration in IIS or any rules rewrite.
Because you are getting 404 error, Can you please check your ASP.NET Applications Directory Browsing Settings. Please enable it and check again. Moreover Sometimes due to Application Pool (Integrated/Classic) you may get this type of error.

which one select after publish webapi

I am working with asp.net MVC with web API
I create an account in Microsoft azure
my API successfully publish but I don't know which one is select from below
then I click the link and display below 2 part one is deployment center and quick start I don't know which one is select
what should I do next?
help
By default, Azure provides us a simple page hostingstart.html when you create App Service. It's the default page when you get redirected when you access the url.
And, I understand you have published the .Net Framework - Web API. And, you clicked on the App Service and navigated to the root which is expected.
Now, you need to type-in the Controllername/Actionmethod name which should look something as shown below.
https://webapiazuredemo.azurewebsites.net/Home/Index
Can you show the folder structure of the app?
Update: It looks like the database was not created in Azure and so the APIs were throwing an error. Once you create database and it's objects properly in Azure, change the connection string in the code. It should work after that.

Is it possible to deploy 2 separate MVC apps into one Azure Web App?

It's been incredible exhausting for me, after passing a week to deploy MVCForum (Source Code) to my Azure Web App. I've read that it was possible if you selected a different path when publishing, something that I did. But when I tried running, my main app and the MVC Forum were conflicting between them.
I'd like to use Azure's Web Apps instead of Azure's Cloud Services because of the simplicity and the possibility of only uploading the files that have changed. I have seen that it is possible to upload Web Api and MVC in that fashion, but I have not found an example that sends 2 different MVC apps into a same Web App.
Is it possible to do it with 2 different MVC apps? (Note: Areas are not an option, since the MVC Forum Source Code resides on a completely different solution)
Thanks!
Given your comment that you are trying to work with separate deployments:
A Web App under the same name (e.g. myapp.azurewebsites.net) is going to be managed by a single deployment. That is, if you have two github repo's (or two dropbox folders, or two of anything) and try to push up new content from deployment B, you'll effectively wipe out deployment A.
You can certainly have multi-path apps running in the same deployment, but they'd need to be part of a single distribution (e.g. single github repo). Otherwise, you'd need multiple deployment slots (e.g. app-a.azurewebsites.net and app-b.azurewebsites.net).
Maybe you can use virtual directory to upload multiple app projects in single webapp, this article explained it
Create projects
Assign virtual directory
Publish the root project
Set up virtual directory in azure portal
Publish the child projects

How to serve static content from Azure Mobile Service C# backend

I'm running a mobile services instance (C# backend) and besides all the other functionality, I also need to host a few html pages and their respective css files.
Here is what I tried:
If I browse to http://<service-url>/myfile.html I get an 404 error. So I
created a myfile.html file and stuck it in the project root folder. Now, instead of 404, I get a blank page.
I tried going through the ContentController by putting the html file in <project root>\api\Content\Views\myfile.html. When I browse to http://<service-url>/api/Content/Views/myfile.html I get a blank page.
Update Dec, 2015
Now that Microsoft published App Services you should probably use that - create a mobile app and a web app and you're done.
Don't try to hack around with Mobile Services.
It always felt to me that Mobile Services were a half baked solution. It is more a competitor to Parse.com and similar BaaS and was missing a lot of the stuff you'd expect from an Azure service.
Update
The solution below does not work but it does teach you a lot about how the mobile service is built. The reason the solution does not work is that Azure refuses to upload the static files to the mobile service instance.
You start by understanding what is Owin and that mobile services are using one. This post helped me a lot.
Then you look in this link which explains how to build a file server using katana.
Here are short instructions:
Install nuget package Microsoft.Owin.StaticFiles.
Plug into the OwinAppBuilder and instruct it to use Katana's file server just before you run the original (put this in WebApiConfig.cs):
var originalAppBuilder = StartupOwinAppBuilder.OwinAppBuilder;
StartupOwinAppBuilder.Initialize(builder =>
{
builder.UseFileServer("/static");
originalAppBuilder(builder);
}
Create a static folder in your project root, put some files there and browse to <your service url>/static/somefile.html.

Categories