Web.config
| <?xml version="1.0" encoding="utf-8"?> <configuration> <appSettings file="app.config"> <add key="webpages:Version" value="3.1.0.0" /> <add key="webpages:Enabled" value="false" /> </appSettings> </configuration> |
app.config
| <?xml version="1.0"?> <appSettings> <add key="ProjectVersion" value="02.00.0000"/> </appSettings> |
Yazan C#, Yararlı Bilgiler | Yorum (0) »
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | // RazorViewEngine Temizleniyor ViewEngines.Engines.Clear(); // Yeni bir RazorViewEngine Ekleniyor. İçeriği dolduruluyor. RazorViewEngine _RazorViewEngine = new RazorViewEngine() { FileExtensions = new string[] { "cshtml" } }; var ViewLocation = new string[] { "~/Views/{1}/{0}.cshtml", "~/Views/Shared/{0}.cshtml", }; _RazorViewEngine.PartialViewLocationFormats = ViewLocation; _RazorViewEngine.MasterLocationFormats = ViewLocation; _RazorViewEngine.ViewLocationFormats = ViewLocation; // TwoLevelViewCache Ekleniyor. _RazorViewEngine.ViewLocationCache = new TwoLevelViewCache(_RazorViewEngine.ViewLocationCache); ViewEngines.Engines.Add(_RazorViewEngine); |
devam »
Yazan C#, Yararlı Bilgiler | Yorum (0) »
| Nuget PM> Install-Package EntityFramework 6.2 PM> Install-Package MemoryCache |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | public class MyDbConfiguration : DbConfiguration { /// <summary> /// InMemoryCache Nesnesi oluşturmayı sağlar. Entity Framework Query Cache için bir adet eklendi. /// Nuget Install-Package MemoryCache Ekli olması lazım. /// </summary> public static InMemoryCache EntityCache = new InMemoryCache(); public MyDbConfiguration() : base() { // Entity Framework Query Cache Eklenmesi sağlanyan kod. CacheTransactionHandler TransactionHandler = new CacheTransactionHandler(EntityCache); AddInterceptor(TransactionHandler); Loaded += (sender, args) => args.ReplaceService<DbProviderServices>((s, _) => new CachingProviderServices(s, TransactionHandler, new CachingPolicy())); // Entity Framework Query Cache Eklenmesi sağlanyan kod. } } |
devam »
Yazan C#, Yararlı Bilgiler | Yorum (0) »
| Nuget PM> Install-Package EntityFramework 6.2 PM> Nuget Install-Package MemoryCache PM> Install-Package EntityFramework.Cache |
| public class MyDbConfiguration : DbConfiguration { public MyDbConfiguration() : base() { // App'in Çalıştığı yeri bulur string UIPath = Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase).Replace("bin", "Documents\\Cache").Replace("file:\\", ""); // ModelStore Set Eder.. SetModelStore(new DefaultDbModelStore(UIPath)); } } |
Yazan C#, Yararlı Bilgiler | Yorum (0) »
C:\<Microsoft Visual Studio Install Folder>\Common7\IDE\devenv.exe.config
| <system.net> <settings> <ipv6 enabled="true"/> </settings> </system.net> |
add: <servicePointManager expect100Continue=”false” />
| <system.net> <settings> <ipv6 enabled="true"/> <servicePointManager expect100Continue="false" /> </settings> </system.net> |
Yazan Yararlı Bilgiler | Yorum (0) »
Öncelikle bir domain redirect extensions’i gerekli benim kullanığım Switcheroo Redirector
https://tr.wikipedia.org/ > http://tr.wiki.admicos.cf/ Yapıyoruz.
Sonra içimizden bir kere özgür internet istiyoruz diyoruz. Artık wikipedia ya giriş yapabiliriz.
Yazan Yararlı Bilgiler | Yorum (0) »
web.config
| <system.web> <httpCookies requireSSL="true" /> </system.web> |
Yazan Security | Yorum (0) »
web.config
| <httpProtocol> <customHeaders> <add name="X-Frame-Options" value="SAMEORIGIN" /> </customHeaders> </httpProtocol> |
Yazan Security | Yorum (0) »
Web.config
| <System.Web> <httpRuntime enableVersionHeader="false" /> </System.Web> |
Yazan Security | Yorum (0) »