Automated tests
WebResource Caching
Hi,
I have to issue with WebResource.axd requets:
1- There is no 'Expire Date' is response header of some WebResource.axd requests and it cause webresource reload in every page postbacks. How can fix this issue and add this field in response header?
2- In some cases I get 404 error for WebResource.axd requets.
I have prcompiled my web site and set debug="false". What should I do to fix these issues? Are they related to my deployment or IIS config?
Thank you very very much for your reply
How to host my service in self webapplication
hello .net heros
i am getting confused about how to host my webservice....
in my soluation there are 5 project namely
1)Business object model
2) data access layer
3) service layer ==wcf application project containing svc file
5) my web application (startup application)
now business object model, data access layer is refrenced with servervice layer
and service layer refrences as web refrence in my web applicaiton
i mean all the thing is done by visual studio bydefault i have never touch the web.config or app.config but in my startup project web.config i m seeing there is added endpoint with address something like this htttp://localhost:8081/mp.svc
now my question is i have uploaded all the thing in web and trying to run my svc file which is in service layer in address http://new.manpowerlink.com/Host/MP.svc but it gives me error that business object not found..
and even my webapplicaition is not able to run service ..where as in local every thing is perfect so any idia heros
u can see the main link http://new.manpowerlink.com/Host/MP.svc
and main link is http://new.manpowerlink.com
please let me know
thanks in advance
Works in IIS 6 but breaks in IIS 7
Does anyone know why my ASP.NET 3.5 application works fine in Windows Server 2003 with IIS 6.0, but it breaks on Windows Server 2008 IIS 7.0 and Vista Ultimate with IIS 7.0?
It's just a small web app using the Microsoft Unity Container (Ioc and Dependency Injection).
The other weird thing is that when I'm debugging the application in VS 2008 and "View in Browser" using the Visual Studio web server, the application works perfectly, on the Vista machine with IIS 7.0. Why is this happening?
Here's the error message on the Vista machine as it runs in IIS 7.0 as a web site I've created from the compiled application.
Server Error in '/' Application.
Object reference not set to an instance of an object.
Description:An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.
Source Error:
Line 27: // The code-behind should only talk to the Facade class.Line 28: // Look how clean this is!!! Line 29: lblMessage.Text = Facade.WriteMessage(); Line 30: LoadStates(); Line 31: } |
Source File: C:\Users\King Wilder\Documents\Visual Studio 2008\Projects\UnityTestProject.Web\UnityTestProject.Web\Default.aspx.cs Line: 29
Stack Trace:
[NullReferenceException: Object reference not set to an instance of an object.] UnityTestProject.Web._Default.Page_Load(Object sender, EventArgs e) in C:\Users\King Wilder\Documents\Visual Studio 2008\Projects\UnityTestProject.Web\UnityTestProject.Web\Default.aspx.cs:29 System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14 System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35 System.Web.UI.Control.OnLoad(EventArgs e) +99 System.Web.UI.Control.LoadRecursive() +50 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627 |
Version Information: Microsoft .NET Framework Version:2.0.50727.3053; ASP.NET Version:2.0.50727.3053
Any help would be appreciated.
Thanks.
best practice for configuration on Multi-Tenant (single website) isolated DB
My company holds a dozen websites and isolated DBs (identical schemas). every customer(group of users in specific company) has its own website (different app pool) and DB.
every website has its own configuration, several connection strings, but they all have same schema for configuration.
cust1.domain.com
cust2.domain.com
cust3.domain.com
We would like to merge all websites to one (single app pool) and stay with isolated DBs for security and large amount of data reasons.
it means that all the addresses above will be binded on a single website.
How i can identify whitch DB with aspmembership to be loaded - what configuration to load. assume that i want to merge all bindings to single website and once customer (group of users in specific company) is connected, the iis (or how responsible for it) will redirect to customer's configuration (like connectionStrings)?
what is the best practice for designing a DAL and configuration of it? what are the implications of it, if large amount of tenant will be on the same time? does one application pool can manage this situation or it can be managed somehow?
BTW, we are using asp-membership for users authentication.
Thanks in advance,
Eddie
The server committed a protocol violation
I created a asp.net 3.5 web service using the visual studio service template. After that without modifying it i published it to the server.
Now when i am trying to add the service reference it shows the below error.
There was an error downloading 'http://test1.owdaro.com/service1.asmx/_vti_bin/ListData.svc/$metadata'.
The server committed a protocol violation. Section=ResponseHeader Detail=CR must be followed by LF
Metadata contains a reference that cannot be resolved: 'http://test1.owdaro.com/service1.asmx'.
The server committed a protocol violation. Section=ResponseHeader Detail=CR must be followed by LF
The server committed a protocol violation. Section=ResponseHeader Detail=CR must be followed by LF
If the service is defined in the current solution, try building the solution and adding the service reference again.
what settings or configurations do i need to fix it. Or can anyone tell me of a walthrough or steps to manually add the web reference.
Lots of Thanks
Web Deployment of App_GlobalResources of VS2010, .net 4.0 Precompiled website
Hi,
Here is the situtaion. I have a web application project which is deployed on client machines using msi(as a pre compiled website).
There are aspx, images, controls files in the project etc. We also have app_globalresources which contains resx files. This is added recently in the project for localization of the website.When i try to deploy this application on a server. On the fresh installation of this using msi, It throws the error message:"The directory '/App_GlobalResources/' is not allowed because the application is precompiled"
The Build action for the resx files is set to "Embedded Resource".
Can anyone please tell me what is that I'm missing in the deployment of this web application? This urgent requirement. Any help greatly appreciated.
Thanks.
Session State - Order of Precedence
We have sessions that are timing out. Our timeout is set to a high value but we still seem to get timeouts early than expected.
So, something else if affecting the timeout.
Given the following, what is order the precedence?
Web.config : SessionState using InProc (timeout=50 )
IIS 6.0 : Under Configuration/Option tab, Enable Session State (session timeout=30)
Application Pool : Under Performance Tab, Idle Timeout (shutdown worker process = 20)
Thanks.
Steve
Environment:
ASP.NET 2.0
Windows Server 2003
IIS 6.0
An attempt to attach an auto-named database for file \ASPNETDB.MDF failed
I have an asp.net website that I've adopted but had running for a year or so. The machine that was hosting it died and as a result was replaced. I'm trying to get the site back up but running into the following error message whenever I try to naviage to any portion of the site that utilizes the attached database (such as logging in):
An attempt to attach an auto-named database for file C:\SiteFolder\SiteName\App_Data\ASPNETDB.MDF failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.
I have administrative rights, I'm able to browse to the file, attach and open it in SQL Management Studio. My site and DefaultWebSites are the only two listed under IIS. Default is stopped.
I've searched around and found some information, I tried modifying my connection string to include: user instance=True;
This resulted in the first error message including an operating system 5 error:
Unable to open the physical file "C:\SiteFolder\SiteName\App_Data\ASPNETDB.MDF". Operating system error 5: "5(Access is denied.)".
Thanks in advance for any assistance you can provide.
to deploy the asp.net project in remote harddisk and to run on two networked computer
Hi,
Two computers are connected with a remote hard disk. How can publish the asp.net project which make to run the published file on both computers from that remote hard disk . Exe file from c# program can run from hard disk. But I dont know how to make it through asp.net
Please advice
With Thanks
Pol
The attribute connectionstringName is missing or empty
Hi Friends,
I am getting this exception when trying to get or create a user using Membership or Profile.Here is my web.config code.I am using VS2010 Framework 4.0.
What could be the problem?
<connectionStrings><add name="classConnectionString" connectionString="Data Source=MINHAS\SQLEXPRESS;Initial Catalog=Test;Integrated Security=True"/></connectionStrings><profile defaultProvider="MyProvider"><properties><add name="Name" type="System.String"/><add name="ID" type="System.String"/><add name="Color" type="System.String"/></properties><providers><clear/><add name="MyProvider" type="System.Web.Profile.SqlProfileProvider" connnectionStringName="classConnectionString" applicationName="/"/></providers></profile><membership defaultProvider="MyProvider"><providers><add name="MyProvider" connnectionStringName="classConnectionString" type="System.Web.Security.SqlMembershipProvider" applicationName="/" enablePasswordRetrieval="true" enablePasswordReset="true" passwordFormat="Encrypted" requiresQuestionAndAnswer="true"/></providers></membership>
Reg Adding files or folder to SVN for the first time
Hi
Could you please let me know how to add files/folders to SVN for the first time, the repository is already created in SVN but i need to add another folder for my project so that my other team members can SVN checkout specifically my folder.
Thanks in advance.
Best regards,
Usha.
URL Rewrite Crashing .Net
We have tried to deploy some URL rewriting rules today on our production site and it seems to be crashing .Net.
After about 10 minutes of being operational the site died and we got this error in the logs :
ISAPI 'C:\Windows\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll' reported itself as unhealthy for the following reason: 'Deadlock detected'.
We have some code in global.asax also that is looking for incoming requests to the old URLs and 301 redirecting them to the new ones, so it is more intensive than before.
Where do I even start to debug this?
IIS Virtual Directory across DMZ gives Bad Username
We have an Asp.Net Web Application that we install on client networks for their use. I had one recently where they put the web server on a different domain inside a DMZ, I don't have a huge knowledge of these but I set the Application Pool Identity to Network Service and set the Network Service user to have full permissions on the folders that host the virtual directories. This however doesn't work as I cannot access anything in the virtual directory and I even tried creating a new user on both domains with the same username/password and giving this user access to the folders but still didn't cure it. Also tried the 'Connect As' with a domain\username type username for the domain it was connecting to but still no luck.
The strange thing is I can access the folders themselves within Windows Explorer so I know they can be accessed from this server. They had to set individual ports for things like Sql Server (also on another domain) to give access, is there possibly a port used for Virtual Directories I just need them to open?
VS2012 pubxml and TransformWebConfigEnabled
Maybe someone can advise me.
I am trying to publish a project using VS2012. I have setup a publish profile to publish it to a file system drive.
I have several environments/build configurations required and thusly am using Web.Config transformations.
At the moment, I have a web.config + 5 transforms (one for each build config). When the solution is published, it successfully deploys to the file system specified. However it also transforms the Web.Config into web.config.
I have modified the .pubxml to include the
<TransformWebConfigEnabled>False</TransformWebConfigEnabled>element, but the publish process just seems to ignore it and transform the web.config regardless. Followed via this link:http://msdn.microsoft.com/en-us/library/dd465342(v=vs.100).aspx
Can anyone advise?
[edit] I have tried putting
<TransformWebConfigEnabled>False</TransformWebConfigEnabled>element into both the pubxml and the proj file and both ways it get's completely ignored and the web.config is transformed regardless.
WebResource.axd strange behavior
Hi
Please some one help me. I'm getting creazy!!!!
My problem is about caching of WebResource.axd requests.
In the begining, every responses of WebResource.axd requests have caching header and there is no problem.The problem is begin when I press Ctrl+F5 or make a request after clearing browser cache history. That cause no cache header for WebResource.axd requests for unknown time ??!!! (it's tested on Chrome and Firefox)
I've created a simple HttpModule that add cache header and create a log for WebResource.axd requsets:
void httpApp_PostRequestHandlerExecute(object sender, EventArgs e)
{
HttpApplication app = (HttpApplication)sender;
HttpContext context = app.Context;
string req = context.Request.Url.LocalPath.ToLower();
if (req.IndexOf("webresource.axd") != -1 || req.IndexOf("scriptresource.axd") != -1)
{
Tools.Log log = new Log("webresource");
log.Add_Log(req);
context.Response.Cache.SetCacheability(HttpCacheability.Public);
context.Response.Cache.SetExpires(DateTime.Now.AddYears(1));
}
}
I realized that this module is in request pipline just before the start of problem. I mean after press Ctrl+F5 , this module is not run in requets pipline (no log entry in problem)
Please tell me what is my problem
Thank you very very much for your reply
Internet explorer cannot display the webpage
Hi
I have hosted my asp.net application on windows server 2003. Its working fine but sometime on some systems whenever we browse for havy data inernet explorer stops and display a message that internet explorer can not display the webpage.
At the same time if i access the same page from Mozilla or Chrome it works fine.
If any body have understood the prolem and know the answer, please let me know.
Thanks,
Dheeraj Sharma
Problem with custom error pages
Hi,
I'm having a problem with our custom error pages.
The custom error page for our site is displayed fine in most cases, however when a user attempts to access a file without an extension such aswww.mysite.com/apage. (with the dot) the custom error page is not loaded, the user is presented with the following -
Server Error in '/' Application.
Runtime Error
Description: An exception occurred while processing your request. Additionally, another exception occurred while executing the custom error page for the first exception. The request has been terminated.
When viewed on the server (without the custom error page) the following is shown -
Server Error in '/' Application.
The resource cannot be found.
Description:HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly.
Requested URL: /apage.
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.17929
My web.config is set as follows -
<customErrorsmode="RemoteOnly"defaultRedirect="~/error2.aspx">
</customErrors>
error2.aspx is a new custom error page that I created, it is a blank web form so I'm really unsure as to what could be causing an error from within it.
If anyone has any advice I'd be most grateful...
Kind regards
Phil
able to ping Active Directory domain but unable to connect to AD
Hi,
AD: LDAP://XXXXXXXXX-XXXX:389/dc=org/dc=companyname
our company has one application hosted on third party webserver.
when i ping from that server i am getting response:
C:\Users\Administrator>ping XXXXXXXXX-XXXX.companyname.org
but when i am trying to connect from that server (program) to company's AD i am getting error:
Message: The server is not operational.
Source: System.DirectoryServices
Method: Void Bind(Boolean)
Stack Trace:
at System.DirectoryServices.DirectoryEntry.Bind(Boolean throwIfFail)
at System.DirectoryServices.DirectoryEntry.Bind()
at System.DirectoryServices.DirectoryEntry.get_AdsObject()
at System.DirectoryServices.DirectorySearcher.FindAll(Boolean findMoreThanOne)
at System.DirectoryServices.DirectorySearcher.FindOne()
at testing.Page_Load(Object sender, EventArgs e) in d:\wwwroot\concur\testing.aspx.cs:line 62
When I click Start, point to Find, and then click People, I receive the following error:
The specified directory service could not be reached. The service may be temporarily unavailable or the server name may be incorrect.
New to ASP.NET - First Deploy
Hi,
I'm new to ASP.NET and have spent the last few months learning it and developing a web site. It is time now to publish that web site and access it from the real world to continue testing. However, when I try to access the site I just get a "500" error. I'm pretty sure it's a configuration or missing file/dll thing but have no idea where to start looking. I'm hoping to get some ideas here.
- I think I started the project as a Web Site and not a Web Application. I do have a "Convert to Web Application" option in the context menu for the site. I also have a .csproj file in the root folder. I think that changes how I publish somehow.
- I am using the Publish option and publishing to a directory on my local drive which I then copy to the IIS server.
- I have all my classes in a "classes" folder which does not appear to get published. However, I do get a "bin" directory which contains a DLL for the site which is smaller than all the files uncompiled. I am assuming that the classes folder and all the code behind files are compiled into that DLL?
- I am using Developer Express components and see that I get no DLL's output for them. Per their instruction I have copied 3 of their DLL's into the "bin" folder. I don't know if I'm supposed to register them or something too?
- Once on the IIS server, I have converted the "bin" folder to an application - I have no idea if this is needed but remember back in my ISAPI.DLL days I had to mark a folder as executable to allow the DLL's to run.
The IIS server is version 8 (point something) and running on Windows Server 2012. I have done no configuration of the server or IIS (I don't think - someone else actually set it up). Is there any thing I need to do with IIS to make it run an ASP.NET site?
Thanks in advance for any advice or direction,
Mike