I've been struggling with this problem, and while something elegant would be preferred any old hack will do at this point :)
I have a repository that is registered something like:
<castle>
<properties>
<myConnStr>Data Source=COMPUTERNAME\SQL2008;Initial Catalog=MyDB;Persist Security Info=True;User ID=username;Password=password<...
I'm building an ASP.NET MVC application that uses a DDD (Domain Driven Design) approach with database access handled by NHibernate. I have domain model class (Administrator) that I want to inject a dependency into via an IOC Container such as Castle Windsor, something like this:
public class Administrator
{
public virtual int Id { g...
Hi there,
Why in ASP.NET MVC is it when I use a:
return this.RedirectToAction("Index", "Page", new { pageKey = "test/ho/hum"})
or using the MVCContrib extension:
return this.RedirectToAction<PageController>(c => c.Index("test/ho/hum"))
formats my return URL as:
http://localhost:8882/?pageKey=test%2Fho%2Fhum
and not:
http://localho...
Hi
I am wondering is this normal when you add this into your web.config
<location path="." inheritInChildApplications="false"> </location>
The debugger should stop working. Like when I add this to my site and try to run in debug mode it won't activate any of my debug points nor will it lock up Visual studios 2008. I can have it runn...
Hello,
I'm developing an ASP.NET MVC app and today, after one month, I uploaded a new version to my server (Discount Asp.NET). Since that, I'm having some problems to display one of the pages:
http://www.jobbox.com.br/cocoonhealth/profile/gguerini Invalid characters are shown instead of the page.
All the other pages are ok. I tried to ...
Basically, the Model is like this:
----------------------------------
| CAT_ID | CAT_NAME | CAT_PARENT |
----------------------------------
which make this a recursive relationship. But how should we use this model in our Asp.net mvc web application with least amount of query. My temporary solution is pass the object in to the functi...
How do I design my URL to match my function like this:
public ActionResult GetStuff(string name, string address, double latitude, double longitude)
{ }
...
Hi
I am currently on a shared hosting plan with iis 7.0
I have an asp.net mvc application in the wwwroot of my hosting. Now I made a virtual directory to store my webservice in(I don't want to have to host this on a sub domain and pay extra)
However when I put my web service code in my virtual directory and try to run it I get this
E...
Hi folks,
i wish to have a simple Action in my controller that accepts a few optional values and some integer values.
this is my route i wish to have:
HTTP.POST
/review/create
and this is the Action method i would like...
[AcceptVerbs(HttpVerbs.Post)]
public JsonResult Create(int userId,
int addressId,
...
I already have a User table in my primary application database with an email address (which will act as the user name) and a password. I would like to authenticate using my database instead of the default authentication database (ASPNETDB).
Questions:
Is this a bad idea? Is it a huge can of worms to use my own DB for authentication?
H...
I am using DataAnnotations in an ASP.NET MVC 1 application to check for Required fields and numerical ranges using the Required and Range attributes.
I am looking for the best way to validate the length of strings in a few input text boxes. I see that there is a RegularExpression attribute that could do the job but I was wondering if ...
I have included jQuery as well as colorize plugin reference in my master page and I want to use it in my Content pages.
My scripts are located in Scripts folder in MVCApplication. I am referencing it in my master pages as :
<script language="javascript" type="text/javascript"
src="<%= Url.Content ("~/Scripts/jquery-1.3.2.min.js")%> "...
hi, when i running mvc app on iis7.5 win 7 it cause an exception "Request is not available in this context" which this don't cause when running by vs2008. can anyone help me?
...
I have some partial actions that I render with the Asp.Net Futures RenderAction method. Some of these perform redirects after the forms in them have been processed.
Now that I upgraded to Asp.Net MVC 2 RC it gives me an error "Child actions are not allowed to perform redirect actions".
I checked out the source code and I found the line...
I'm looking for recommendations for a spreadsheet-like input facility to sit in an ASP MVC environment.
The client currently has a large number of very complex interlinked shared spreadsheets (which they are effectively running 90% of their core business from) for collecting and processing information. They wish to move this to a web...
Hi,
I have the following model:
Customer:
ID
Name
Address
Phone
Fax
I added an Edit view based on the above model from the controller. I modified the Edit view to only allow edit on the Phone and Fax field (deleted the rest). When I submit it I get an error. It works if I leave the Edit view untouched (5 fields). However I only wan...
Greetings!
I need assistance with ASP.NET MVC and the values posted from a form operation (form is inside a Partial View).
On my page to create a User Account, various form fields collect the information. The Partial View is backed by a ViewModel (UserAccountViewModel).
To validate and/or save the information, I need to pass the valu...
Do the parameter names in ASP.NET MVC routes need to match those in their corresponding actions, and if so, why?
...
Our website has files in a few different languages - French, Spanish, Portuguese, and English. When a user uploads a file that contains special characters like ó or ç or ã etc i get an error message when i return File(data, "application/octet-stream", name); in MVC i get the exception:
System.FormatException: An invalid character was fo...
I work for a small development team and have been using Tortoise and Visual SVN (for visual studio 2008 integration) for our source versioning. We primarily develop in c# .Net MVC but have some legacy apps in vb6 and classic ASP (so any system that could handle those as well is a plus).
I have never been 100% happy with tortoise (8 mon...