286 references to Response
System.Runtime.Remoting (8)
channels\http\httpremotinghandler.cs (8)
295
Stream outputStream = context.
Response
.OutputStream;
296
context.
Response
.Clear();
297
context.
Response
.ClearHeaders();
298
context.
Response
.ContentType = ComposeContentType("text/plain", Encoding.UTF8);
299
context.
Response
.TrySkipIisCustomErrors = true;
300
context.
Response
.StatusCode = (int) HttpStatusCode.InternalServerError;
301
context.
Response
.StatusDescription = CoreChannel.GetResourceString("Remoting_InternalError");
547
HttpResponse httpResponse = context.
Response
;
System.ServiceModel.Web (7)
System\ServiceModel\Description\WebScriptClientGenerator.cs (1)
86
HttpContext.Current.
Response
.Cache.SetCacheability(HttpCacheability.Public);
System\ServiceModel\Dispatcher\HelpPage.cs (4)
101
HttpContext.Current.
Response
.Cache.SetCacheability(HttpCacheability.Public);
102
HttpContext.Current.
Response
.Cache.SetMaxAge(TimeSpan.MaxValue);
103
HttpContext.Current.
Response
.Cache.AddValidationCallback(new HttpCacheValidateHandler(this.CacheValidationCallback), this.startupTime);
104
HttpContext.Current.
Response
.Cache.SetValidUntilExpires(true);
System\ServiceModel\Web\CachingParameterInspector.cs (2)
268
HttpCachePolicy cache = HttpContext.Current.
Response
.Cache;
352
HttpContext.Current.
Response
.AddCacheDependency(new CacheDependency[] { cacheDependency });
System.Web (224)
Abstractions\HttpContextWrapper.cs (1)
177
return new HttpResponseWrapper(_context.
Response
);
DefaultHttpHandler.cs (2)
69
HttpResponse response = _context.
Response
;
114
HttpResponse response = _context.
Response
;
ErrorFormatter.cs (5)
179
context.
Response
.UseAdaptiveError = true;
249
TextWriter textWriter = context.
Response
.SwitchWriter(stringWriter);
251
context.
Response
.SwitchWriter(textWriter);
291
if (String.Compare(context.
Response
.ContentType, 0,
294
context.
Response
.ContentType = wmlContentType;
Handlers\AssemblyResourceLoader.cs (6)
506
context.
Response
.Clear();
636
HttpCachePolicy cachePolicy = context.
Response
.Cache;
652
context.
Response
.ContentType = contentType;
684
StreamWriter writer = new StreamWriter(context.
Response
.OutputStream, reader.CurrentEncoding);
690
Stream outputStream = context.
Response
.OutputStream;
725
context.
Response
.IgnoreFurtherWrites();
Handlers\TraceHandler.cs (1)
95
_response = _context.
Response
;
Hosting\IIS7WorkerRequest.cs (4)
1679
ctx.
Response
.SynchronizeStatus(status, subStatus, description);
2194
ctx.
Response
.SynchronizeHeader(headerIndex, name, value);
2224
ctx.
Response
.SynchronizeHeader(knownHeaderIndex, name, value);
2355
context.
Response
.HeadersWritten = true;
HttpApplication.cs (10)
382
response = _context.
Response
;
3449
context.
Response
.GenerateResponseHeadersForHandler();
3592
context.
Response
.GenerateResponseHeadersForHandler();
3622
context.
Response
.GenerateResponseHeadersForHandler();
3650
|| context.
Response
.StatusCode != (int)HttpStatusCode.SwitchingProtocols) {
3659
context.Request.StoreReferenceToResponseCookies(context.
Response
.GetCookiesNoCreate());
3693
_application.Context.
Response
.FilterOutput();
3924
context.
Response
.FilterOutput();
4181
context.
Response
.SyncStatusIntegrated();
4241
context.
Response
.SyncStatusIntegrated();
HttpBufferlessInputStream.cs (2)
236
if (!_context.
Response
.IsClientConnected) {
314
_context.
Response
.CloseConnectionAfterError();
HttpContext.cs (7)
366
Response
.StatusCode = (int)HttpStatusCode.SwitchingProtocols; // 101
368
Response
.AppendHeader("Sec-WebSocket-Protocol", subprotocol);
683
obj =
Response
;
1111
Response
.TrySkipIisCustomErrors = true;
1112
HttpRuntime.ReportAppOfflineErrorMessage(
Response
, HttpRuntime.AppOfflineMessage);
1133
Response
.ReportRuntimeError(e, true /*canThrow*/, false);
1137
Response
.ReportRuntimeError(eReport, false /*canThrow*/, false);
HttpDebugHandler.cs (16)
153
context.
Response
.Write(SR.GetString(SR.Debugging_forbidden, context.Request.Path));
154
context.
Response
.StatusCode = 403;
163
context.
Response
.Write(SR.GetString(SR.Invalid_Debug_Request));
164
context.
Response
.StatusCode = 500;
171
context.
Response
.Write("OK");
176
context.
Response
.Write(SR.GetString(SR.Invalid_Debug_Request));
177
context.
Response
.StatusCode = 500;
191
context.
Response
.Write(SR.GetString(SR.Debug_Access_Denied, context.Request.Path));
192
context.
Response
.StatusCode = 401;
202
context.
Response
.Write(SR.GetString(SR.Invalid_Debug_ID));
203
context.
Response
.StatusCode = 500;
223
context.
Response
.Write(SR.GetString(SR.Debug_Access_Denied, context.Request.Path));
224
context.
Response
.StatusCode = 401;
243
context.
Response
.Write(SR.GetString(SR.Error_Attaching_with_MDM, "0x" + rc.ToString("X8", CultureInfo.InvariantCulture)));
244
context.
Response
.StatusCode = 500;
252
context.
Response
.Write("OK");
HttpRequest.cs (3)
265
return _context.
Response
;
2598
(_context.
Response
.StatusCode == 404 || _context.
Response
.StatusCode == 400) &&
HttpRuntime.cs (12)
1474
context.
Response
.InitResponseWriter();
1510
context.
Response
.InitResponseWriter();
1550
context.
Response
.UpdateNativeResponse(sendHeaders);
1561
context.
Response
.UpdateNativeResponse(sendHeaders);
1585
context.
Response
.Dispose();
1604
UpdatePerfCounters(context.
Response
.StatusCode);
1683
context.
Response
.InitResponseWriter();
1706
context.
Response
.InitResponseWriter();
1721
context.
Response
.InitResponseWriter();
1731
context.
Response
.InitResponseWriter();
1748
HttpResponse response = context.
Response
;
2118
context.
Response
.Dispose();
httpserverutility.cs (8)
318
HttpResponse response = _context.
Response
;
432
HttpResponse response = _context.
Response
;
697
_context.
Response
.End();
730
_context.
Response
.End();
764
HttpResponse response = _context.
Response
;
839
context.
Response
.SetOverrideErrorFormatter(errorFormatterGenerator.GetErrorFormatter(e));
842
context.
Response
.ReportRuntimeError(e, false, true);
985
Encoding e = (_context != null) ? _context.
Response
.ContentEncoding : Encoding.UTF8;
OutputCacheModule.cs (4)
291
string coding = context.
Response
.GetHttpHeaderContentEncoding();
566
response = context.
Response
;
1029
response = context.
Response
;
1140
if (cache.VaryByContentEncodings.IsModified() && !cache.VaryByContentEncodings.IsCacheableEncoding(context.
Response
.GetHttpHeaderContentEncoding())) {
Security\AnonymousIdentificationModule.cs (6)
97
context.
Response
.Cookies.RemoveCookie(s_CookieName);
98
context.
Response
.Cookies.Add(cookie);
104
context.
Response
.Redirect(context.Request.RawUrl, false);
180
context.
Response
.Cookies.Add(cookie);
271
context.
Response
.Cookies.Add(cookie);
274
context.
Response
.Redirect(context.Request.RawUrl);
Security\AuthStoreRoleProvider.cs (4)
596
context.
Response
.Clear();
597
context.
Response
.StatusCode = 500;
598
context.
Response
.Write(AuthStoreErrorFormatter.GetErrorText());
599
context.
Response
.End();
Security\BackStopAuthenticationModule.cs (6)
106
if (context.
Response
.StatusCode > 200) { // Invalid credentials
107
if (context.
Response
.StatusCode == 401)
119
if (context.
Response
.StatusCode > 200) { // Invalid credentials
120
if (context.
Response
.StatusCode == 401)
140
context.
Response
.Write(AuthFailedErrorFormatter.GetErrorText());
143
context.
Response
.GenerateResponseHeadersForHandler();
Security\CookielessHelper.cs (7)
60
_Context.
Response
.SetAppPathModifier("(" + _Headers + ")");
108
_Context.
Response
.SetAppPathModifier("(" + _Headers + ")");
113
string newFilePath = _Context.
Response
.RemoveAppPathModifier(filePath);
172
_Context.
Response
.SetAppPathModifier("(" + _Headers + ")");
174
_Context.
Response
.SetAppPathModifier(null);
305
_Context.
Response
.Cookies.Add(new HttpCookie(s_AutoDetectName, s_AutoDetectValue));
309
_Context.
Response
.Redirect(redirectPath, true);
Security\FileAuthorizationModule.cs (4)
134
context.
Response
.SetStatusCode(401, subStatus: 3);
287
context.
Response
.Write((new FileAccessFailedErrorFormatter(context.Request.PhysicalPathInternal)).GetErrorMessage(context, false));
289
context.
Response
.Write((new FileAccessFailedErrorFormatter(null)).GetErrorMessage(context, true));
293
context.
Response
.GenerateResponseHeadersForHandler();
Security\FormsAuthentication.cs (6)
421
context.
Response
.Cookies.RemoveCookie(FormsCookieName);
422
context.
Response
.Cookies.Add(cookie);
425
context.
Response
.Redirect(GetLoginPage(null), false);
456
HttpContext.Current.
Response
.Cookies.Add(cookie);
612
context.
Response
.Redirect(strUrl, false);
770
context.
Response
.Redirect(loginUrl, false);
Security\FormsAuthenticationModule.cs (9)
156
e.Context.
Response
.Redirect(e.Context.Request.RawUrl);
174
e.Context.
Response
.Cookies.Remove(cookie.Name);
175
e.Context.
Response
.Cookies.Add(cookie);
245
if (context.
Response
.StatusCode != 401)
253
if (context.
Response
.SuppressFormsAuthenticationRedirect) {
321
context.
Response
.Redirect(strRedirect, false);
451
context.
Response
.Redirect(strUrl);
462
context.
Response
.Cookies.Remove(cookie.Name);
463
context.
Response
.Cookies.Add(cookie);
Security\PassportAuthenticationModule.cs (6)
175
if (context.
Response
.StatusCode != 401 || id.WWWAuthHeaderSet)
179
context.
Response
.Clear();
180
context.
Response
.StatusCode = 200;
191
context.
Response
.Write(strMsg);
195
context.
Response
.Write(errorFormatter.GetAdaptiveErrorMessage(context, true));
233
context.
Response
.Redirect(strRedirect, false);
Security\PassportIdentity.cs (14)
82
context.
Response
.AppendHeader("Set-Cookie", strACookie);
85
context.
Response
.AppendHeader("Set-Cookie", strPCookie);
124
context.
Response
.AppendHeader(strHeader, strValue);
826
context.
Response
.StatusCode = 401;
827
context.
Response
.End();
835
context.
Response
.Redirect(str, false);
974
context.
Response
.ClearHeaders();
1017
context.
Response
.Cookies.Add(cookie);
1024
context.
Response
.Expires = -1;
1025
context.
Response
.Cache.SetCacheability(HttpCacheability.NoCache);
1026
context.
Response
.AppendHeader("Pragma", "no-cache");
1027
context.
Response
.ContentType = "image/gif";
1031
context.
Response
.WriteFile(strSignOutDotGifFileName);
1037
context.
Response
.Redirect(strRU, false);
Security\RoleManagerModule.cs (2)
162
if (!Roles.Enabled || !Roles.CacheRolesInCookie || context.
Response
.HeadersWritten)
187
context.
Response
.Cookies.Add(cookie);
Security\Roles.cs (2)
441
context.
Response
.Cookies.RemoveCookie(CookieName);
442
context.
Response
.Cookies.Add(cookie);
Security\UrlAuthorizationModule.cs (3)
111
context.
Response
.StatusCode = 401;
159
context.
Response
.Write(UrlAuthFailedErrorFormatter.GetErrorText());
162
context.
Response
.GenerateResponseHeadersForHandler();
State\SessionIDManager.cs (5)
284
return context.
Response
.IsRequestBeingRedirected;
333
if (context.
Response
.HeadersWritten) {
356
context.
Response
.Cookies.Add(cookie);
376
context.
Response
.Redirect(path, false);
393
context.
Response
.Cookies.RemoveCookie(Config.CookieName);
State\SessionStateContainer.cs (2)
189
return HttpContext.Current.
Response
.ContentEncoding.CodePage;
195
HttpContext.Current.
Response
.ContentEncoding = Encoding.GetEncoding(value);
State\SessionStateModule.cs (1)
1397
if (_rqAddedCookie && !setItemCalled && context.
Response
.IsBuffered()) {
State\StateRuntime.cs (9)
261
context.
Response
.ContentType = null;
297
response = context.
Response
;
312
response = context.
Response
;
327
response = context.
Response
;
332
context.
Response
.StatusCode = 404;
413
HttpResponse response = context.
Response
;
470
context.
Response
.StatusCode = 200;
512
HttpResponse response = context.
Response
;
696
context.
Response
.StatusCode = 400;
StaticFileHandler.cs (3)
336
HttpResponse response = context.
Response
;
480
HttpResponse response = context.
Response
;
583
context.
Response
.TransmitFile(physicalPath, offset, length);
UI\Control.cs (3)
2608
int presize = context.
Response
.GetBufferedLength();
2610
int postsize = context.
Response
.GetBufferedLength();
3006
return Context.
Response
.ApplyAppPathModifier(url);
UI\HtmlForm.cs (2)
304
if (cookieless && Context.Request != null && Context.
Response
!= null) {
305
action = Context.
Response
.ApplyAppPathModifier(action);
UI\Page.cs (1)
5567
_response = context.
Response
;
UI\PartialCachingControl.cs (2)
367
TextWriter savedWriter = Context.
Response
.SwitchWriter(tmpWriter);
376
Context.
Response
.SwitchWriter(savedWriter);
UI\TraceContext.cs (5)
501
row[SR.Trace_Status_Code] = _context.
Response
.StatusCode;
502
row[SR.Trace_Response_Encoding] = _context.
Response
.ContentEncoding.EncodingName;
573
cookies = new HttpCookie[_context.
Response
.Cookies.Count];
574
_context.
Response
.Cookies.CopyTo(cookies, 0);
799
ArrayList headers = _context.
Response
.GenerateResponseHeaders(false);
UI\ViewStateException.cs (1)
58
HttpResponse response = context != null ? context.
Response
: null;
UI\WebControls\AdPostCacheSubstitution.cs (1)
36
context.
Response
.WriteSubstitution(callback);
UI\WebControls\DataListItem.cs (2)
104
int presize = con.
Response
.GetBufferedLength();
108
int postsize = con.
Response
.GetBufferedLength();
UI\WebControls\SiteMapPath.cs (1)
599
Context.
Response
.ApplyAppPathModifier(ResolveClientUrl(HttpUtility.UrlPathEncode(node.Url))) : node.Url;
Util\AspCompat.cs (32)
666
return CookiesToString(_context.
Response
.Cookies);
670
_context.
Response
.Cookies.Add(new HttpCookie(name));
674
_context.
Response
.Cookies[name].Value = text;
678
_context.
Response
.Cookies[name].Values[key] = value;
682
_context.
Response
.Cookies[name].Expires = DateTime.FromOADate(dtExpires);
686
_context.
Response
.Cookies[name].Domain = domain;
690
_context.
Response
.Cookies[name].Path = path;
694
_context.
Response
.Cookies[name].Secure = (secure != 0);
698
_context.
Response
.Write(text);
702
_context.
Response
.OutputStream.Write(bytes, 0, size);
706
_context.
Response
.Redirect(url);
710
_context.
Response
.AppendHeader(name, value);
714
_context.
Response
.Pics(value);
718
_context.
Response
.Clear();
722
_context.
Response
.Flush();
726
_context.
Response
.End();
730
_context.
Response
.AppendToLog(entry);
734
return _context.
Response
.ContentType;
738
_context.
Response
.ContentType = contentType;
742
return _context.
Response
.Charset;
746
_context.
Response
.Charset = charSet;
750
return _context.
Response
.CacheControl;
754
_context.
Response
.CacheControl = cacheControl;
758
return _context.
Response
.Status;
762
_context.
Response
.Status = status;
766
return _context.
Response
.Expires;
770
_context.
Response
.Expires = expiresMinutes;
774
return _context.
Response
.ExpiresAbsolute.ToOADate();
778
_context.
Response
.ExpiresAbsolute = DateTime.FromOADate(dtExpires);
782
return _context.
Response
.BufferOutput ? 1 : 0;
786
_context.
Response
.BufferOutput = (isBuffering != 0);
790
return _context.
Response
.IsClientConnected ? 1 : 0;
Util\WithinCancellableCallbackTaskAwaitable.cs (1)
53
context.
Response
.ObserveResponseEndCalled();
XmlSiteMapProvider.cs (3)
124
if (context == null || !context.
Response
.UsePathModifier || subNodes.Count == 0) {
956
if (node == null || context == null || !context.
Response
.UsePathModifier) {
962
resultNode.Url = context.
Response
.ApplyAppPathModifier(node.Url);
System.Web.DataVisualization (6)
WebForm\General\ChartHttpHandler.cs (6)
268
context.
Response
.Charset = "";
269
context.
Response
.ContentType = GetMime(key);
270
context.
Response
.BinaryWrite(data);
545
context.
Response
.Write(w.ToString());
721
context.
Response
.StatusCode = 404;
722
context.
Response
.StatusDescription = SR.ExceptionHttpHandlerImageNotFound;
System.Web.Extensions (30)
Handlers\ScriptModule.cs (5)
87
context.
Response
.ClearHeaders();
88
context.
Response
.Clear();
89
context.
Response
.Cache.SetCacheability(HttpCacheability.NoCache);
90
context.
Response
.ContentType = "text/plain";
97
PageRequestManager.EncodeString(context.
Response
.Output,
Script\Services\RestClientProxyHandler.cs (2)
17
context.
Response
.ContentType = "application/x-javascript";
18
context.
Response
.Write(clientProxyString);
Script\Services\RestHandler.cs (21)
65
context.
Response
.Cache.SetCacheability(HttpCacheability.Server);
66
context.
Response
.Cache.SetExpires(DateTime.Now.AddSeconds(cacheDuration));
67
context.
Response
.Cache.SetSlidingExpiration(false);
68
context.
Response
.Cache.SetValidUntilExpires(true);
72
context.
Response
.Cache.VaryByParams["*"] = true;
75
context.
Response
.Cache.VaryByParams.IgnoreParams = true;
79
context.
Response
.Cache.SetNoServerCaching();
80
context.
Response
.Cache.SetMaxAge(TimeSpan.Zero);
176
context.
Response
.ContentType = contentType;
180
context.
Response
.Write(responseString);
217
string charset = context.
Response
.Charset;
218
context.
Response
.ClearHeaders();
219
context.
Response
.ClearContent();
220
context.
Response
.Clear();
221
context.
Response
.StatusCode = statusCode;
222
context.
Response
.StatusDescription = HttpWorkerRequest.GetStatusDescription(statusCode);
223
context.
Response
.ContentType = "application/json";
224
context.
Response
.AddHeader("jsonerror", "true");
226
context.
Response
.Charset = charset;
230
context.
Response
.TrySkipIisCustomErrors = true;
231
using (StreamWriter writer = new StreamWriter(context.
Response
.OutputStream, new UTF8Encoding(false))) {
Script\Services\WebServiceClientProxyGenerator.cs (2)
46
context.
Response
.StatusCode = 304;
57
HttpCachePolicy cachePolicy = context.
Response
.Cache;
System.Web.Mobile (10)
Mobile\ErrorHandlerModule.cs (2)
119
context.
Response
.Clear();
130
context.
Response
.Write(e2.ToString());
UI\MobileControls\Adapters\HtmlPageAdapter.cs (1)
405
context.
Response
.ContentEncoding = Encoding.GetEncoding(preferredResponseEncoding);
UI\MobileControls\Adapters\MobileTextWriter.cs (1)
151
HttpContext.Current.
Response
.ContentType = contentType;
UI\MobileControls\Adapters\WmlFormAdapter.cs (1)
54
HttpContext.Current.
Response
.Cookies.Remove(formsAuthCookieName);
UI\MobileControls\Adapters\XhtmlAdapters\XhtmlBasicFormAdapter.cs (1)
44
HttpContext.Current.
Response
.Cookies.Remove(formsAuthCookieName);
UI\MobileControls\Adapters\XhtmlAdapters\XhtmlCssHandler.cs (2)
37
context.
Response
.ContentType="text/css";
47
context.
Response
.Write (response);
UI\MobileControls\Adapters\XhtmlAdapters\XhtmlMobileTextWriter.cs (1)
811
WriteAttribute ("encoding", HttpContext.Current.
Response
.ContentEncoding.WebName);
UI\MobileControls\MobileControl.cs (1)
393
return Context.
Response
.ApplyAppPathModifier(url);
System.Workflow.Runtime (1)
Hosting\WorkflowWebHostingModule.cs (1)
91
HttpContext.Current.
Response
.Cookies.Add(cookie);