Search Results

Search found 1610 results on 65 pages for 'pure ftpd'.

Page 10/65 | < Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >

  • Need help trying to allow my remote PowerShell script to run on my Windows 2008 r2 Server

    - by Pure.Krome
    I've got a Windows 2008 r2 server with Sql Server 2008 r2 installed. I've got a Sql Server Agent which tries to run a Powershell job, but fails :- Message Executed as user: FooServer\SqlServerUser. A job step received an error at line 1 in a PowerShell script. The corresponding line is '& '\\polanski\Backups\Database\7ZipFooDatabases.ps1'' Correct the script and reschedule the job. The error information returned by PowerShell is: 'File \\polanski\Backups\Database\7ZipFooDatabases.ps1 cannot be loaded. The file \\polanski\Backups\Database\7ZipFooDatabases.ps1 is not digitally signed. The script will not execute on the system. Please see "get-help about_signing" for more details.. '. Process Exit Code -1. The step failed. Ok. So i run Powershell on that server then set the execution policy to unrestricted. To check .. PS C:\Users\theUser> Get-ExecutionPolicy Unrestricted PS C:\Users\theUser> Kewl :) but it still doesn't work :( Ok ... what happens when i try to run the powershell from the command line.... PS C:\Users\justin.adler . '\polanski\Backups\Database\7ZipMotorshoutDatabases.ps1' Security Warning Run only scripts that you trust. While scripts from the Internet can be useful, this script can potentially harm your computer. Do you want to run \\polanski\Backups\Database\7ZipFooDatabases.ps1? [D] Do not run [R] Run once [S] Suspend [?] Help (default is "D"): er..... didn't I already tell the server that ANY file can be ran? Notice the file is located at... \\polanski\Backups\Database\ So can someone make any suggestions?

    Read the article

  • Is it possible to do a 301 redirect AND redirect to the requested resource?

    - by Pure.Krome
    For one of our projects, we're doing a rebranding of the website name, logo, etc... As such, we need to 301 Moved Permenantly redirect all users from the old domain to the new domain. With IIS7, that's pretty simple. We just create a new website that redirects all traffic to a host-headered domain .. to the new one. But this loses their original destination resource. eg. Old Domain: www.OldDomain.com New Domain: www.NewDomain.com User: www.OldDomain.com/user/PureKrome -> 301 --> www.newDomain.com Notice how it's going to the new domain BUT not to /user/PureKrome? How can I do this so it goes to the new domain and keeps the original resource request? I'm guessing URL-ReWriter for IIS7 might help? Also, what happens if I want to do this... CurrentDomain 1: Domain.com CorrectDomain 1: www.Domain.com CurrentDomain 2: AnotherDomain.com CorrectDomain 2: www.AnotherDomain.com Is it also possible to have those in the same IIS website? So any URL to domain.com will 301 to www.domain.com Right now I'm making 2 IIS websites, with a 301 hardcoded (which still means I lose the original resource request, too). Help!

    Read the article

  • What does this error mean in my IIS7 Failed Request Tracing report?

    - by Pure.Krome
    when I attempt to goto any page in my web application (i'm migrating the code from an asp.net web site to web application, and now testing it) .. i keep getting some not authenticated error(s) . So, i've turned on FREB and this is what it says... I'm not sure what that means? Secondly, i've also made sure that my site (or at least the default document which has been setup to be default.aspx) has anonymous on and the rest off. Proof: - C:\Windows\System32\inetsrv>appcmd list config "My Web App/default.aspx" -section:anonymousAuthentication <system.webServer> <security> <authentication> <anonymousAuthentication enabled="true" userName="IUSR" /> </authentication> </security> </system.webServer> C:\Windows\System32\inetsrv>appcmd list config "My Web App" -section:anonymousAuthentication <system.webServer> <security> <authentication> <anonymousAuthentication enabled="true" userName="IUSR" /> </authentication> </security> </system.webServer> Can someone please help?

    Read the article

  • Any free Exchange hosts out there?

    - by Pure.Krome
    Hi folks, Are there any free Microsoft Exchange hosted solutions? I understand that Microsoft Exchange is a paid/licensed product, but I was curious if there might be a host that has a free hosting model (e.g. for <= 3 mailboxes per domain)? Larger mail boxes per domain == cost. ?? Finally, please refrain from suggesting other mail services (eg. sendmail, etc).

    Read the article

  • Have some questions about setting up a VPN to my private cloud servers

    - by Pure.Krome
    I've got a number of Virtual Servers running at a pretty big Cloud provider. They are all running Windows 2008 R2. I have a CISCO ASA firewall in front of them. Currently, I've got all ports blocked except 80/443/21/3386 (for Remote Desktop). I asked to have a VPN enabled on the firewall and they said it's easy to do BUT I need to use the 3rd party Cisco software. Now, I don't want to get into a debate about it .. but we don't want to install anything extra on our -client- computers. We all use Windows 7 and we love using the built in VPN client to connect to other private LANS we have setup in other locations. So i'm wondering what options I have to create a VPN tunnel to our private cloud LAN? All our cloud servers are part of WORKGROUP, so there's no Active Directory .. nor do we want to install all that. Secondly, we know we can open up a firewall port - so any ports for starting a VPN is fine! Lastly, I was thinking of just using one of the existing servers as the VPN server (and using the Windows VPN software) .. but I'm not sure this is a good thing? Remember - we just want to use the baked in VPN software in Windows 7 .. which is PPTP or SSTP or L2TP/IPSEC. I would -LOVE- to use some free OSS software. For usernames/passwords? We'd probably just have one account .. like U:Hithere P:whatever.. so we don't need any hardcore account management, like Active Directory, etc. So does anyone have any ideas?

    Read the article

  • Can TFS 2010 be installed onto a single server and in a Workgroup (not AD)

    - by Pure.Krome
    Hi folks, currently, we're using TFS2010 at our office and we're about to move. Part of that move is a split of teams. Our team will get their own servers. So we need to build our own TFS server and add our current projects to that. Right now, our TFS server exists on TWO servers - one for TFS and one for our Continuous Integration .. i think that's a build controller or something. That really suxs for us - having TWO servers instead of one for all our source control. We love CI and how it works (after the massive massive pain it was to get our VS2010 solution to CI + web Deploy) ... but it does work. So - can we do this with ONE server? Also, we don't want to have an Active Directory. Will this also work?

    Read the article

  • Can a WPF ComboBox display alternative text when its selection is null?

    - by Garth T Kidd
    G'day! I want my WPF ComboBox to display some alternative text when its data-bound selection is null. The view model has the expected properties: public ThingoSelectionViewModel : INotifyPropertyChanged { public ThingoSelectionViewModel(IProvideThingos) { this.Thingos = IProvideThingos.GetThingos(); } public ObservableCollection<Thingo> Thingos { get; set; } public Thingo SelectedThingo { get { return this.selectedThingo; } set { // set this.selectedThingo and raise the property change notification } // ... } The view has XAML binding to the view model in the expected way: <ComboBox x:Name="ComboboxDrive" SelectedItem="{Binding Path=SelectedThingo}" IsEditable="false" HorizontalAlignment="Left" MinWidth="100" IsReadOnly="false" Style="{StaticResource ComboboxStyle}" Grid.Column="1" Grid.Row="1" Margin="5" SelectedIndex="0"> <ComboBox.ItemsSource> <CompositeCollection> <ComboBoxItem IsEnabled="False">Select a thingo</ComboBoxItem> <CollectionContainer Collection="{Binding Source={StaticResource Thingos}}" /> </CompositeCollection> </ComboBox.ItemsSource> </ComboBox> The ComboBoxItem wedged into the top is a way to get an extra item at the top. It's pure chrome: the view model stays pure and simple. There's just one problem: the users want "Select a thingo" displayed whenever the ComboBox' selection is null. The users do not want a thingo selected by default. They want to see a message telling them to select a thingo. I'd like to avoid having to pollute the viewmodel with a ThingoWrapper class with a ToString method returning "Select a thingo" if its .ActualThingo property is null, wrapping each Thingo as I populate Thingos, and figuring out some way to prevent the user from selecting the nulled Thingo. Is there a way to display "Select a thingo" within the ComboBox' boundaries using pure XAML, or pure XAML and a few lines of code in the view's code-behind class?

    Read the article

  • Overloading generic implicit conversions

    - by raichoo
    Hi I'm having a little scala (version 2.8.0RC1) problem with implicit conversions. Whenever importing more than one implicit conversion the first one gets shadowed. Here is the code where the problem shows up: // containers class Maybe[T] case class Nothing[T]() extends Maybe[T] case class Just[T](value: T) extends Maybe[T] case class Value[T](value: T) trait Monad[C[_]] { def >>=[A, B](a: C[A], f: A => C[B]): C[B] def pure[A](a: A): C[A] } // implicit converter trait Extender[C[_]] { class Wrapper[A](c: C[A]) { def >>=[B](f: A => C[B])(implicit m: Monad[C]): C[B] = { m >>= (c, f) } def >>[B](b: C[B])(implicit m: Monad[C]): C[B] = { m >>= (c, { (x: A) => b } ) } } implicit def extendToMonad[A](c: C[A]) = new Wrapper[A](c) } // instance maybe object maybemonad extends Extender[Maybe] { implicit object MaybeMonad extends Monad[Maybe] { override def >>=[A, B](a: Maybe[A], f: A => Maybe[B]): Maybe[B] = { a match { case Just(x) => f(x) case Nothing() => Nothing() } } override def pure[A](a: A): Maybe[A] = Just(a) } } // instance value object identitymonad extends Extender[Value] { implicit object IdentityMonad extends Monad[Value] { override def >>=[A, B](a: Value[A], f: A => Value[B]): Value[B] = { a match { case Value(x) => f(x) } } override def pure[A](a: A): Value[A] = Value(a) } } import maybemonad._ //import identitymonad._ object Main { def main(args: Array[String]): Unit = { println(Just(1) >>= { (x: Int) => MaybeMonad.pure(x) }) } } When uncommenting the second import statement everything goes wrong since the first "extendToMonad" is shadowed. However, this one works: object Main { implicit def foo(a: Int) = new { def foobar(): Unit = { println("Foobar") } } implicit def foo(a: String) = new { def foobar(): Unit = { println(a) } } def main(args: Array[String]): Unit = { 1 foobar() "bla" foobar() } } So, where is the catch? What am I missing? Regards, raichoo

    Read the article

  • PHP Mcrypt - Encrypting / Decrypting file

    - by whitman6732
    Trying to write a couple of functions that will encrypt or decrypt a file and am using the class found here to try and accomplish this: http://www.itnewb.com/v/PHP-Encryption-Decryption-Using-the-MCrypt-Library-libmcrypt The encryption function below seems to work, in that it appears to encrypt the file and place it in the intended directory. I'm trying to decrypt the file now, and it just dies with the message "Failed to complete decryption" (which is coded in there...) There's nothing in the php error logs, so I'm not sure why it's failing, but as mcrypt is entirely new to me, I'm more than inclined to believe I'm doing something wrong here... Here are the functions: //ENCRYPT FILE function encryptFile() { global $cryptastic; $pass = PGPPASS; $salt = PGPSALT; $key = $cryptastic->pbkdf2($pass, $salt, 1000, 32) or die("Failed to generate secret key."); if ($handle = opendir(PATH.'/ftpd')) { while (false !== ($file = readdir($handle))) { if ($file != "." && $file != "..") { $newfile = PATH.'/encrypted/'.$file.'.txt'; $msg = file_get_contents(PATH.'/ftpd/'.$file); $encrypted = $cryptastic->encrypt($msg, $key) or die("Failed to complete encryption."); $nfile = fopen($newfile, 'w'); fwrite($nfile, $encrypted); fclose($nfile); unlink(PATH.'/ftpd/'.$file); } } closedir($handle); } //DECRYPT FILE function inFTP() { global $cryptastic; $pass = PGPPASS; $salt = PGPSALT; $key = $cryptastic->pbkdf2($pass, $salt, 1000, 32) or die("Failed to generate secret key."); if ($handle = opendir(PATH.'/encrypted')) { while (false !== ($file = readdir($handle))) { if ($file != "." && $file != "..") { $newfile = PATH.'/decrypted/'.$file; $msg = PATH.'/encrypted/'.$file; $decrypted = $cryptastic->decrypt($msg, $key) or die("Failed to complete decryption."); $nfile = fopen($newfile, 'w'); fwrite($nfile, $decrypted); fclose($nfile); //unlink(PATH.'/encrypted/'.$file); } } closedir($handle); } //$crypt->decrypt($file); }

    Read the article

  • How to use JNI, but only when available for current platform?

    - by Mecki
    What is the common way (or best practice) to optionally use JNI? E.g. I have a Java class and this class is 100% pure Java, so it can run on all platforms. However, on some platforms I'd like to speed up some heavy calculations using JNI - which works fine. Unfortunately I cannot support any existing Java platform in the world. So I guess it is fine to initially only support the big three: Linux, Windows, Mac OS X. So what I'd like to do is to use JNI on those three platforms and use the 100% pure Java version on all other platforms. Now I can think of various ways how to do that (loading class dynamically for example and either loading the JNI class or the pure Java one), but thinking that this is a common issue that thousands of projects had to solve in the past for sure, I'm really surprised to not find any documentation or references to the question how to solve this most elegantly or effectively.

    Read the article

  • Adding OutputCache to a WebForm crashes my site :(

    - by Pure.Krome
    Hi folks, When I add either ... <%@ OutputCache Duration="600" Location="Any" VaryByParam="*" %> or <%@ OutputCache CacheProfile="CmsArticlesListOrItem" %> (.. and this into the web.config file...) <caching> <outputCacheSettings> <outputCacheProfiles> <add name="CmsArticlesListOrItem" duration="600" varyByParam="*" /> </outputCacheProfiles> </outputCacheSettings> <sqlCacheDependency ........ ></sqlCacheDependency </caching> my page/site crashes with the following error:- Source: System.Web ---------------------------------------------------------------------------- TargetSite: System.Web.DirectoryMonitor FindDirectoryMonitor(System.String, Boolean, Boolean) ---------------------------------------------------------------------------- Message:System.Web.HttpException: Directory 'C:\Web Sites\My Site Foo - Main Site\Controls\InfoAdvice' does not exist. Failed to start monitoring file changes. at System.Web.FileChangesMonitor.FindDirectoryMonitor(String dir, Boolean addIfNotFound, Boolean throwOnError) at System.Web.FileChangesMonitor.StartMonitoringPath(String alias, FileChangeEventHandler callback, FileAttributesData& fad) at System.Web.Caching.CacheDependency.Init(Boolean isPublic, String[] filenamesArg, String[] cachekeysArg, CacheDependency dependency, DateTime utcStart) at System.Web.Caching.CacheDependency..ctor(Int32 dummy, String[] filenames, DateTime utcStart) at System.Web.Hosting.MapPathBasedVirtualPathProvider.GetCacheDependency(String virtualPath, IEnumerable virtualPathDependencies, DateTime utcStart) at System.Web.ResponseDependencyList.CreateCacheDependency(CacheDependencyType dependencyType, CacheDependency dependency) at System.Web.HttpResponse.CreateCacheDependencyForResponse(CacheDependency dependencyVary) at System.Web.Caching.OutputCacheModule.InsertResponse(HttpResponse response, HttpContext context, String keyRawResponse, HttpCachePolicySettings settings, CachedVary cachedVary, CachedRawResponse memoryRawResponse) at System.Web.Caching.OutputCacheModule.OnLeave(Object source, EventArgs eventArgs) at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) Ok .. so for some reason, the OutputCache wants a folder/file to be there? Well, i've had this site live for around 3 years and i'm pretty sure that the folders \Controls and \Controls\InfoAdvice doesn't exist on my production server. On my localhost, it sure does .. and contains a large list of ascx controls. But they don't exist on my live server. So ... what is going on here? Can anyone please help? Oh :) Before someone suggests I create those two folders and even stick a random file in those folders .. and have some random text in those random files .. i've done that and it doesn't seem to work, still :( Please Help !

    Read the article

  • How to pass a random User/Pass (for Basic Authentication) with JMeter?

    - by Pure.Krome
    Hi folks, I'm using JMeter to stress test an API. I've got Basic Authentication set up - seems to be working great. Now, i'm trying to randomize the credentials that JMeter passes across the wire. So, there's two ways I know I can do this. Add a custom HTTP Header (via an HTTP Header Manager Element) and set then value to the random fields (ie. something I've read in from a csv file) Use the HTTP Authorization Manager Element and pass in the username and password there. Now, if I try and use method (1) above, I need to create the following header/data :- Authorization: Basic <some Base64 encoded string in the format username:password> eg. Authorization: Basic OnVzZXIxOnBhc3Mx Kewl. simple. BUT that header value is not getting passed across the wire :( I can add any other header type and it's passed across the wire.. hmm .. ok then .. lets try method (2). Now that works .. but I can only hardcode in the username & password. I can't see how I can pass in a username VARIABLE (ie. ${usernmae} ) or a password VARIABLE (ie. ${password} ).... If it's hardcoded, then the server correctly replies with the correct page/data. so .. can someone please help?

    Read the article

  • SWT Layout for absolute positioning with minimal-spanning composites

    - by pure.equal
    Hi, I'm writing a DND-editor where I can position elemtents (like buttons, images ...) freely via absolute positioning. Every element has a parent composite. These composites should span/grasp/embrace every element they contain. There can be two or more elements in the same composite and a composite can contain another composite. This image shows how it should look like. To achive this I wrote a custom layoutmanager: import org.eclipse.swt.SWT; import org.eclipse.swt.graphics.Point; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Control; import org.eclipse.swt.widgets.Layout; public class SpanLayout extends Layout { Point[] sizes; int calcedHeight, calcedWidth, calcedX, calcedY; Point[] positions; /* * (non-Javadoc) * * @see * org.eclipse.swt.widgets.Layout#computeSize(org.eclipse.swt.widgets.Composite * , int, int, boolean) * * A composite calls computeSize() on its associated layout to determine the * minimum size it should occupy, while still holding all its child controls * at their minimum sizes. */ @Override protected Point computeSize(Composite composite, int wHint, int hHint, boolean flushCache) { int width = wHint, height = hHint; if (wHint == SWT.DEFAULT) width = composite.getBounds().width; if (hHint == SWT.DEFAULT) height = composite.getBounds().height; return new Point(width, height); } /* * (non-Javadoc) * * @see * org.eclipse.swt.widgets.Layout#layout(org.eclipse.swt.widgets.Composite, * boolean) * * Calculates the positions and sizes for the children of the passed * Composite, then places them accordingly by calling setBounds() on each * one. */ @Override protected void layout(Composite composite, boolean flushCache) { Control children[] = composite.getChildren(); for (int i = 0; i < children.length; i++) { calcedX = calcX(children[i]); calcedY = calcY(children[i]); calcedHeight = calcHeight(children[i]) - calcedY; calcedWidth = calcWidth(children[i]) - calcedX; if (composite instanceof Composite) { calcedX = calcedX - composite.getLocation().x; calcedY = calcedY - composite.getLocation().y; } children[i].setBounds(calcedX, calcedY, calcedWidth, calcedHeight); } } private int calcHeight(Control control) { int maximum = 0; if (control instanceof Composite) { if (((Composite) control).getChildren().length > 0) { for (Control child : ((Composite) control).getChildren()) { int calculatedHeight = calcHeight(child); if (calculatedHeight > maximum) { maximum = calculatedHeight; } } return maximum; } } return control.computeSize(SWT.DEFAULT, SWT.DEFAULT, true).y + control.getLocation().y; } private int calcWidth(Control control) { int maximum = 0; if (control instanceof Composite) { if (((Composite) control).getChildren().length > 0) { for (Control child : ((Composite) control).getChildren()) { int calculatedWidth = calcWidth(child); if (calculatedWidth > maximum) { maximum = calculatedWidth; } } return maximum; } } return control.computeSize(SWT.DEFAULT, SWT.DEFAULT, true).x + control.getLocation().x; } private int calcX(Control control) { int minimum = Integer.MAX_VALUE; if (control instanceof Composite) { if (((Composite) control).getChildren().length > 0) { for (Control child : ((Composite) control).getChildren()) { int calculatedX = calcX(child); if (calculatedX < minimum) { minimum = calculatedX; } } return minimum; } } return control.getLocation().x; } private int calcY(Control control) { int minimum = Integer.MAX_VALUE; if (control instanceof Composite) { if (((Composite) control).getChildren().length > 0) { for (Control child : ((Composite) control).getChildren()) { int calculatedY = calcY(child); if (calculatedY < minimum) { minimum = calculatedY; } } return minimum; } } return control.getLocation().y; } } The problem with it is that it always positions the composite at the position (0,0). This is because it tries to change the absolute positioning into a relative one. Lets say I position a image at position (100,100) and one at (200,200). Then it has to calculate the location of the composite to be at (100,100) and spanning the one at (200,200). But as all child positions are relative to their parents I have to change the positions of the children to remove the 100px offset of the parent. When the layout gets updated it moves everything to the top-left corner (as seen in the image) because the position of the image is not (100,100) but (0,0) since I tried to remove the 100px offset of the partent. Where is my error in reasoning? Is this maybe a totally wrong approach? Is there maybe an other way to achive the desired behavior? Thanks in advance! Best regards, Ed

    Read the article

  • Unable to read in my custom .config section

    - by Pure.Krome
    Hi folks, NOTE: this is very very similar to this SO question, but I need some more help. i'm trying to make the following section in my .config file, but i get an exception when trying to access this section. .config file <configSections> <section name="foos" type="Ackbar.Mvc.Models.Foo.FooCollection, Ackbar.Mvc" requirePermission="false"/> <section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler" requirePermission="false" /> </configSections> <foos> <add name="aaa" something="zzz"/> <add name="bbb" something="yyy"/> <add name="ccc" something="xxx"/> </foos> Ok, so this means i need to make two classes classes public class FooCollection : ConfigurationElementCollection { ... with my custom overrides, etc. ... } and public class FooElement : ConfigurationElement { [ConfigurationProperty("Name", IsRequired = true)] public string Name { .. } [ConfigurationProperty("Something ", IsRequired = true)] public string Something { .. } [ConfigurationProperty("IsDefault ", IsRequired = false, DefaultValue = false)] public bool IsDefault { .. } } Kewl. Now, when i do the following .... var whatever = ConfigurationManager.GetSection("foos") is throws the following exception :- An error occurred creating the configuration section handler for foos: Type 'Ackbar.Mvc.Models.Foos.FooCollection' does not inherit from 'System.Configuration.IConfigurationSectionHandler'. Can someone please help me? I don't want to wrap the collection INSIDE a parent section. Cheers :)

    Read the article

  • Is it possible to a db constraint in for this rule?

    - by Pure.Krome
    Hi folks, I wish to make sure that my data has a constraint the following check (constraint?) in place This table can only have one BorderColour per hub/category. (eg. #FFAABB) But it can have multiple nulls. (all the other rows are nulls, for this field) Table Schema ArticleId INT PRIMARY KEY NOT NULL HubId TINYINT NOT NULL CategoryId INT NOT NULL Title NVARCHAR(100) NOT NULL Content NVARCHAR(MAX) NOT NULL BorderColour VARCHAR(7) -- Can be nullable. I'm gussing I would have to make a check constraint? But i'm not sure how, etc. sample data. 1, 1, 1, 'test', 'blah...', '#FFAACC' 1, 1, 1, 'test2', 'sfsd', NULL 1, 1, 2, 'Test3', 'sdfsd dsf s', NULL 1, 1, 2, 'Test4', 'sfsdsss', '#AABBCC' now .. if i add the following line, i should get some sql error.... INSERT INTO tblArticle VALUES (1, 2, 'aaa', 'bbb', '#ABABAB') any ideas?

    Read the article

  • What is wrong with my Basic Authentication in my Browser?

    - by Pure.Krome
    Hi folks, i'm trying to goto the following url :- http://user1:pass1@localhost:1234/api/users?format=xml nothing to complex. Notice how i've got the username/password in the url? this, i believe, is for basic authentication. When I do that, the Request Headers are MISSING the 'Authorize' header. Er... that's not right :( I have anonymous authentication only setup on the site. I don't want to have anon off and basic turned on .. because not all of the site requires basic.. only a few action methods. So .. why is this not working? Is this something to do with the fact my code is not sending a 401 challenge or some crap? For What It's Worth, my site is ASP.NET MVC1 running on IIS7 (and the same thing happens when i run it on cassini). Update: If this is an illegal way of calling a resource using basic auth (ala security flaw) .. then is this possible to do, for an ASP.NET MVC website .. per action method (and not the entire site, per say)?

    Read the article

  • How to invalidate the OutputCache in a webfarm?

    - by Pure.Krome
    Hi folks, i've got a website that uses OutputCache attribute to cache pages. Works great. Now, I'm in the middle of R&D'ing scaling up this site to be in a web farm. Along with the usual suspects for webfarm pain ... I've noticed (pretty quickly/obviously) that the OutputCache from Server_A doesn't invalidate the OutputCache from Server_B .. if a try and invalidate a single server's OutputCache. This makes total sense - how can S_A 'tell' S_B to invalidate when they are physically 2 seperate machines, etc? So - what are our options? Velocity? I understand this will move the caching to a different layer .. which means that the final result (output) will always be required to be determined .. as opposed to the OutputCache whic remembers the final output content (yes, varby gives different versions, etc.. which is totally fine). So even though the poco or business objects are all sync'd, there's still that last rendering effort required (even if it's tiny .. compared to the effort to generate/sync business objects). So yeah .. not sure of the options here and what other people do?

    Read the article

  • How can i get this ASP.NET MVC SelectList to work?

    - by Pure.Krome
    Hi folks, I create a selectList in my controller, to display in the view. I'm trying to create it on the fly, sorta thing .. like this... myViewData.PageOptionsDropDown = new SelectList(new [] {"10", "15", "25", "50", "100", "1000"}, "15"); It compiles, but the output is bad... <select id="PageOptionsDropDown" name="PageOptionsDropDown"> <option>10</option> <option>15</option> <option>25</option> <option>50</option> <option>100</option> <option>1000</option> </select> Notice how no item is selected? How can i fix this?? Update Just bumping this ... issue still outstanding :(

    Read the article

  • Why does using ASP.NET OutputCache keep returning a 200 OK, not a 304 Not Modified?

    - by Pure.Krome
    Hi folks, i have a simple aspx page. Here's the top of it:- <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Foo.aspx.cs" Inherits="Foo" %> <%@ OutputCache Duration="3600" VaryByParam="none" Location="Any" %> Now, every time I hit the page in FireFox (either hit F5 or hit enter in the url bar) I keep getting a 200 OK response. Here's a sample reply from FireBug :- Request Headers:- GET /sitemap.xml HTTP/1.1 Host: localhost.foo.com.au User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-GB; rv:1.9.2) Gecko/20100115 Firefox/3.6 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Language: en-au,en-gb;q=0.7,en;q=0.3 Accept-Encoding: gzip,deflate Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive: 115 Connection: keep-alive Cookie: <snipped> If-Modified-Since: Tue, 01 Jun 2010 07:35:17 GMT If-None-Match: "" Cache-Control: max-age=0 Response Headers:- HTTP/1.1 200 OK Cache-Control: public Content-Type: text/xml; charset=utf-8 Expires: Tue, 01 Jun 2010 08:35:17 GMT Last-Modified: Tue, 01 Jun 2010 07:35:17 GMT Etag: "" Server: Microsoft-IIS/7.5 X-Powered-By: UrlRewriter.NET 2.0.0 X-AspNet-Version: 4.0.30319 Date: Tue, 01 Jun 2010 07:35:20 GMT Content-Length: 775 Firebug Cache tab:- Last Modified Tue Jun 01 2010 17:35:20 GMT+1000 (AUS Eastern Standard Time) Last Fetched Tue Jun 01 2010 17:35:20 GMT+1000 (AUS Eastern Standard Time) Expires Tue Jun 01 2010 18:35:17 GMT+1000 (AUS Eastern Standard Time) Data Size 775 Fetch Count 105 Device disk Now, if i try it in Fiddler using the Request Builder (and no extra data) I also keep getting the same 200 OK reply. Request Headers:- GET http://localhost.foo.com.au/sitemap.xml HTTP/1.1 User-Agent: Fiddler Host: foo.com.au Response Headers:- HTTP/1.1 200 OK Cache-Control: public Content-Type: text/xml; charset=utf-8 Expires: Tue, 01 Jun 2010 07:58:00 GMT Last-Modified: Tue, 01 Jun 2010 06:58:00 GMT ETag: "" Server: Microsoft-IIS/7.5 X-Powered-By: UrlRewriter.NET 2.0.0 X-AspNet-Version: 4.0.30319 Date: Tue, 01 Jun 2010 06:59:16 GMT Content-Length: 775 It looks like it's asking to cache it but it's not :( Server is a localhost IIS7.5 on Win7. (as listed in the Response data). Can anyone see what I'm doing wrong?

    Read the article

  • How can i Execute a Controller's ActionMethod programatically?

    - by Pure.Krome
    Hi folks, I'm trying to execute a controller's Action Method programatically and I'm not sure how. Scenario: When my ControllerFactory fails to find the controller, I wish it to manually execute a single action method which i have on a simple, custom controller. I don't want to rely on using any route data to determine the controller/method .. because that route might not have been wired up. Eg. // NOTE: Error handling removed from this example. public class MyControllerFactory : DefaultControllerFactory { protected override IController GetControllerInstance(Type controllerType) { IController result = null; // Try and load the controller, based on the controllerType argument. // ... snip // Did we retrieve a controller? if (controller == null) { result = new MyCustomController(); ((MyCustomController)result).Execute404NotFound(); // <-- HERE! } return result; } } .. and that method is .. public static void Execute404NotFound(this Controller controller) { result = new 404NotFound(); // Setup any ViewData.Model stuff. result.ExecuteResult(controller.ControllerContext); // <-- RUNTIME // ERROR's HERE } Now, when I run the controller factory fails to find a controller, i then manually create my own basic controller. I then call the extension method 'Execute404NotFound' on this controller instance. That's fine .. until it runs the ExecuteResult(..) method. Why? the controller has no ControllerContext data. As such, the ExecuteResult crashes because it requires some ControllerContext. So - can someone out there help me? see what I'm doing wrong. Remember - i'm trying to get my controller factory to manually / programmatically call a method on a controller which of course would return an ActionResult. Please help!

    Read the article

  • What is wrong with this really really simple RegEx expression?

    - by Pure.Krome
    Hi folks, this one is really easy. I'm trying to create a Regular Expression that will result in a Successful Match when against the following text /default.aspx? So i tried the following... ^/default.aspx$ and it's failing to match it. Can someone help, please? (i'm guessing i'm screwing up becuase of the \ and the ? in the input expression).

    Read the article

  • Can someone help me with this StructureMap error i'm getting?

    - by Pure.Krome
    Hi folks, I'm trying to wire up a simple ASP.NET MVC2 controller class to my own LoggingService. Code compiles fine, but I get the following runtime error :- {"StructureMap Exception Code: 202 No Default Instance defined for PluginFamily System.Type, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"} what the? mscorlib ???? Here's some sample code of my wiring up .. protected void Application_Start() { MvcHandler.DisableMvcResponseHeader = true; BootstrapStructureMap(); ControllerBuilder.Current.SetControllerFactory( new StructureMapControllerFactory()); RegisterRoutes(RouteTable.Routes); } private static void BootstrapStructureMap() { ObjectFactory.Initialize(x => x.For<ILoggingService>().Use<Log4NetLoggingService>()); } and finally the controller, simplified for this question ... public class SearchController : Controller { private readonly ILoggingService _log { get; set; } public SearchController(ILoggingService loggingService) : base(loggingService) { // Error checking removed for brevity. _log = loggingService; _log.Tag = "SearchController"; } ... } and the structuremap factory (main method), also way simplified for this question... protected override IController GetControllerInstance(RequestContext requestContext, Type controllerType) { IController result = null; if (controllerType != null) { try { result = ObjectFactory.GetInstance(controllerType) as Controller; } catch (Exception exception) { if (exception is StructureMapException) { Debug.WriteLine(ObjectFactory.WhatDoIHave()); } } } } hmm. I just don't get it. StructureMap version 2.6.1.0 ASP.NET MVC 2. Any ideas?

    Read the article

< Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >