Base solution for your next web application

Activities of "ofir1234"

Question

Hi. I am new to ASP.Net Boilerplate and I think it's a very cool project. I am currently using Boilerplate Module Zero for my web application. When I'm launching the project from my Visual Studio using Ctrl+F5, The icons are shown and everything is cool. When I publish my web project to my IIS 8.5 server and then surfing into my website, I'm getting the following errors in my console (and all of the fontawesome icons aren't working...I see some weird squares instead) :

http://mysite/Bundles/App/fonts/fontawesome-webfont.woff2?v=4.4.0 Failed to load resource: the server responded with a status of 404 (Not Found)
http://mysite/Bundles/App/vendor/famfamfam-flags.png Failed to load resource: the server responded with a status of 404 (Not Found)
http://mysite/Bundles/App/fonts/fontawesome-webfont.woff?v=4.4.0 Failed to load resource: the server responded with a status of 404 (Not Found)
http://mysite/Bundles/App/fonts/fontawesome-webfont.ttf?v=4.4.0 Failed to load resource: the server responded with a status of 404 (Not Found)

I tried the Mime workarounds here : <a class="postlink" href="http://stackoverflow.com/questions/25796609/font-face-isnt-working-in-iis-8-0">http://stackoverflow.com/questions/2579 ... in-iis-8-0</a> <a class="postlink" href="http://stackoverflow.com/questions/4015816/why-is-font-face-throwing-a-404-error-on-woff-files">http://stackoverflow.com/questions/4015 ... woff-files</a>

But nothing helped. Any suggestions ?

Thanks.

Answer

Great! Problem solved. Thanks.

Hi. I have the following class signatures :

public interface IConfigurationManager : IApplicationService {...}
public class ConfigurationManager : IConfigurationManager, ISingletonDependency {...}

I also have this controller in the WebApi project :

public class TrendsController: AbpApiController

And it has a constructor which receives an IConfigurationManager argument.

What I've noticed is that for every api request from TrendsController, The ConfigurationManager class is recreated. But I wanted a single instance for the whole project runtime (therefore I use ISingletonDependency, as written in the documentation here: <a class="postlink" href="http://aspnetboilerplate.com/Pages/Documents/Dependency-Injection">http://aspnetboilerplate.com/Pages/Docu ... -Injection</a>). I know that because I placed a Logger.info call inside the ConfigurationManager constructor, and I see it's recreated for every api call.

Can you please tell me what have I missed ?

Thanks.

Hi. I'm working with the angularjs+entity framework template. I would like to have the following site structure :

http://mysite/london/trends
http://mysite/paris/trends

inside App/Main/views I'll have the folders :

/london
   /paris

and each folder will have a trends.cshtml file.

If the user opened the address <a class="postlink" href="http://mysite/london">http://mysite/london</a> he will see the same navigation bar. Now, if he will choose 'trends' from the menu, it will navigate to <a class="postlink" href="http://mysite/london/trends">http://mysite/london/trends</a>. If he was inside <a class="postlink" href="http://mysite/paris">http://mysite/paris</a> and chose 'trends', it should navigate to <a class="postlink" href="http://mysite/paris/trends">http://mysite/paris/trends</a>

Is there a support for this in the navigation provider cs file ? The angular routing is preety easy:

.state('londontrends', {
                    url: '/london/trends',
                    templateUrl: '/App/Main/views/london/trends/trends.cshtml'
                })
.state('paristrends', {
                    url: '/london/trends',
                    templateUrl: '/App/Main/views/paris/trends/trends.cshtml'
                })

But how should I modify the NavigationProvider cs file to support this scenario? Any documentation for such case ? Thanks.

(btw. if you're asking, when all of this will work, I'll just create a '/' routing which routes to a "select city" page) (I've also read this post, and that's not what I want : #471@40a31a81-8c1b-48d9-9693-c3e17a1b1210)

Hi. I have an application service called TrendsService. This service returns "normal" results like strings and ints. The problem is, I want sometimes to return a custom http-error (return a IHttpActionResult) from this service. I also want a method which returns a file to the client (which means I'm returning an HttpResponseMessage and fill it with a Stream Content). I know these things aren't related to the application level, but you have this automatic api-controller maker in ASP.Net Boilerplate. Does it have some flags to support such things ? (I know I can write [HttpGet] above a method in the service, but I need a little more than that. I need to return HTTP responses.) So, do you have any support for that or the only option is to create another controller which contains all the HTTP-related methods ? This makes my solution have two files : a TrendsController.cs and a TrendsService.cs which makes things look a bit messy.

Thanks

Bump. Still need an answer.

Thanks.

Hi. I am using your template and I must say it's a life saving project. I'm using the angular+entity framework version.

I have this problem : The server startup takes about 15 seconds (I'm restarting the iis and then surfing into my local website and it's taking about 15 seconds) - That's acceptable . The problem is, if no user surf into my website , which means - the website is idle, for about 1 hour, the next time a user is trying to open the website, it takes again about 10-15 seconds for the page to load (after that I have again an hour with super fast performance, less than 1s for loading any page, from any computer). But this 15 seconds of waiting after no user surfs into my website is pretty annoying. What could be the problem ? Thanks.

Hi. I m using your module zero successfully for couple of months now. Thank you for that. I wonder if it's possible to add a windows authentication support. If I m creating a new ASP .NET project, I can choose in the right pane "windows authentication". But your template is already made, so how can I use some windows authentication features? For example, I would like to display "hello ezh276" where this name represents the windows login.

Thanks.

Looks nice. But one thing is missing. After I have configured everything like written in these docs (I m using the default settings with no domain name, password, etc because all of my users are already on a normal domain). Now, can you give an example command I need to use to extract the current "user name" inside an application service ? I can give you an example of the traditional way, using an API controller :

var x = HttpContext.Current.User.Identity.Name

But how can I do it now in an application service ? Is it possible ?

Thanks

Ok. So I've read the LDAP documentation and implemented exactly what's written in there, but still can't let my domain users log in. All of the computers in our company are part of a windows domain, so I can use the default settings and not change anything (as said in the documentation).

So all I've done was this :

Created this class in my Core project :

public class MyLdapAuthenticationSource : LdapAuthenticationSource<Tenant, User>
{
    public MyLdapAuthenticationSource(ILdapSettings settings, IAbpZeroLdapModuleConfig ldapModuleConfig)
        : base(settings, ldapModuleConfig)
    {
    }
}

Then, Added this line to my Core module:

Configuration.Modules.ZeroLdap().Enable(typeof (MyLdapAuthenticationSource));

But I'm still getting the login screen when running the solution, and if I enter (for example) my domain user name, it doesn't log in. I can only log in using the admin, 123qwe password.

What have I missed ?

Showing 1 to 10 of 22 entries