I checked other posts with a similar title, but nothing suggested has worked for me.
Using SQL Server 2014, VS2015 and IIS 8.0.9
Application works perfectly when launched in VS, but fails when deployed to IIS with the above error. The web page contains a drop down box and a start and end date textboxes. User can select hospital from drop down and enter start and end date criteria, click on a button and the results are returned in a gridview control. As I said, this functions perfectly in VS.
When I login to my IIS server, open IIS navigate to my application and select 'browse' from the options and try to navigate to this particular web page, the error is generated. All other functionality works as expected.
What I've tried:
T-SQL
@HospitalID INT = NULL,
@StartSamplingDate DATETIME = NULL,
@EndSamplingDate DATETIME = NULL
AS
BEGIN
SET NOCOUNT ON;
SELECT
DNASCreeningID, Surname, Forename, DoB, T21DNAResult, T18DNAResult,
T13DNAResult, SamplingDate
FROM
tblPatients
WHERE
(@HospitalID IS NULL OR HospitalID = @HospitalID)
AND ((@StartSamplingDate IS NULL) OR SamplingDate >= @StartSamplingDate)
AND ((@EndSamplingDate IS NULL) OR SamplingDate <= @EndSamplingDate)
ORDER BY
DNAScreeningID ASC
END
I'd be grateful for any suggestions or ideas. Thanks.
如果可能,请检查数据库连接您的连接设置为错误的应用程序
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.