iis-6

sqlsrv_fetch_array() expects parameter 1 to be resource, boolean given in

对着背影说爱祢 提交于 2019-11-28 14:15:13
It is not dublicated question. im trying print records from my db (IIS, MSSQL PHP) but i have this error... Warning: sqlsrv_fetch_array() expects parameter 1 to be resource, boolean given in <?php $serverName ="name\SQLEXPRESS"; $usr="sa"; $pwd="pasw"; $db="dbname"; $connectionInfo = array("UID" => $usr, "PWD" => $pwd, "Database" => $db); $conn = sqlsrv_connect($serverName, $connectionInfo); $sql = "SELECT first_col, s_col, t_col, FROM names "; $res = sqlsrv_query($conn,$sql); while ($row = sqlsrv_fetch_array($res)) { print( $row['first_col'].",".$row['s_col'].",".$row['t_col']."); } sqlsrv

ASP.Net FormsAuthentication Redirect Loses the cookie between Redirect and Application_AuthenticateRequest

社会主义新天地 提交于 2019-11-28 14:07:16
I have a FormsAuthentication cookie that is persistent and works independently in a development, test, and production environment. I have a user that can authenticate, the user object is created, the authentication cookie is added to the response: 'Custom object to grab the TLD from the url authCookie.Domain = myTicketModule.GetTopLevelDomain(Request.ServerVariables("HTTP_HOST")) FormsAuthentication.SetAuthCookie(authTicket.Name, False) Response.SetCookie(authCookie) The user gets processed a little bit to check for a first time login, security questions, etc, and is then redirected with the

IIS 404 Custom Error not working as expected

大城市里の小女人 提交于 2019-11-28 13:25:42
I'm working on IIS6, ASP.NET, VS2008. The web site uses a custom error handler to catch 404 errors and serve an alternate page. When presented with an url of the form: http://srv/crimson/articles/index Everything works perfectly. But an url of the form: http://srv/crimson/blog.aspx Where blog.aspx does not exist, fails with the following message: Server Error in '/Crimson' Application. Description: HTTP 404... When I try and debug, none of the breakpoints in my 404 handler are hit. So it appears that something is catching the request earlier. Where? And how to I get it to pass the request on

POST Ajax call results in not found using jqGrid and ASP.NET MVC 2 on IIS6

萝らか妹 提交于 2019-11-28 11:34:30
问题 This is puzzling me. I deployed an MVC 2 application to IIS6 and everything works fine except for my jqGrid calls to get data. All is well on my development machine, but here are the two URLs I'm working with Local dev web server: POST http://localhost:port/Ctrl.mvc/JsonMethod IIS6 (notice https - not sure if that matters) POST https://www.domain.com/AppName/Ctrl.mvc/JsonMethod The latter URL results in a HTTP 404, which is really confusing as all works well on my local machine. The

Redirect from https to http when the SSL cert is no longer valid

你说的曾经没有我的故事 提交于 2019-11-28 11:26:13
问题 I have an IIS 6.0 server and I'm no longer using an SSL certificate (Don't need it anymore because of some functional changes, don't have a valid one I can use). Is there a way for me to redirect users to the http site who already have the https one bookmarked? I tried using a self signed certificate and rewriting the URL to the http version but browsers get a warning about the self signed certificate before I can redirect using web.config. I also tried removing port 443 as an HTTPS binding

Can I deploy .net 4.0 web application on IIS6?

佐手、 提交于 2019-11-28 11:24:07
I've recently upgraded VS 2008 to VS 2010. On our server we have IIS6 installed and we can not change that in near future. Even though we will develop new applications to be deployed on IIS7 but if situation demands we may need to develop an application using .net 4.0 and to be deployed on IIS6, then in this case I wanted to know whether IIS6 supports .net 4.0 application or not? If I can deploy, then do I need to take care of any configuration or any other setting I should change before deploying it? Aristos My very complicate sites now are on iis6 running asp.net 4.0 My only issue moving

Classic ASP text substitution and UTF-8 encoding

不羁岁月 提交于 2019-11-28 09:49:41
We have a website that uses Classic ASP. Part of our release process substitutes values in a file and we found a bug in it where it will write the file out as UTF-8. This then causes our application to start spitting out garbage. Apostrophes get returned as some encoded characters. If we then go an remove the BOM that says this file is UTF-8 then the text that was previously rendered as garbage is now displayed correctly. Is there something that IIS does differently when it encounters UTF-8 a file? UTF-8 does not use BOMs; it is an annoying misfeature in some Microsoft software that puts them

ASP.NET MVC 404 handling and IIS7 <httpErrors>

孤人 提交于 2019-11-28 09:23:09
Good day! I use strategy to handle 404 errors like this: Error handling for ASP.NET MVC 2 and IIS 7.0 or this: How can I properly handle 404 in ASP.NET MVC? In short: I handle 404 as exception in Global.asax without adding any routing rules, if the exception is 404 I render special controller\action with error message. On IIS6 it works with ASP.NET wildcard mapping. On IIS7 in integrated mode I need to add the following to the Web.config (where /error/HttpError404 is my action with 404 page): <httpErrors> <remove statusCode="403" subStatusCode="-1" /> <remove statusCode="404" subStatusCode="-1

Getting the name of the current Windows user returning “IIS APPPOOL/Sitename”

流过昼夜 提交于 2019-11-28 07:31:54
问题 I can't figure this out for the life of me. I'm trying to get the name of the current user logged onto Windows using the following line: string user = System.Security.Principal.WindowsIdentity.GetCurrent().Name.ToString(); When I run this line after publishing and opening it through IIS, it gives me a name of "IIS APPPOOL/SiteName". However, when I run this through the Visual Studio 2013 debugger, the correct name appears. 回答1: you have to enable windows auth/impersonation on an ASP.NET site,

How can I determine the number of users on an ASP.NET site (IIS)? And their info?

↘锁芯ラ 提交于 2019-11-28 06:56:06
Is there a way to determine the number of users that have active sessions in an ASP.NET application? I have an admin/tools page in a particular application, and I would like to display info regarding all open sessions, such as the number of sessions, and perhaps the requesting machines' addresses, or other credential information for each user. ASP.NET Performance Counters like State Server Sessions Active (The number of active user sessions) should help you out. Then you can just read and display the performance counters from your admin page.. Eduardo Molteni In global.aspx void Application