I wanted to use FormsAuthentication to secure my static files as well on my site, so I followed the instructions located here http://learn.iis.net/page.aspx/244/how-to-take-advantage-of-the-iis7-integrated-pipeline/ under title "Enabling Forms Authentication for the Entire Application".
Now though, when I try to visit the site by going directly to http://www.mysite.com I get redirected to http://www.mysite.com/Login.aspx?ReturnUrl=%2f instead of it using my DefaultDocument I have set. I can go to my default document by just visiting http://www.mysite.com/Home.aspx without any issues because it is set to allow anonymous access.
Is there something I need to add into my web.config file to make iis7 allow anonymous access to the root? I tried adding with anonymous access but no such luck.
Any help would be much appreciated.
Both Home and the Login form allow anonymous.
<location path="Home.aspx">
<system.web>
<authorization>
<allow users="*" />
</authorization>
</system.web>
</location>
<location path="Login.aspx">
<system.web>
<authorization>
<allow users="*" />
</authorization>
</system.web>
</location>
Login form is set as the loginUrl
<authentication mode="Forms">
<forms protection="All" loginUrl="Login.aspx">
</forms>
</authentication>
Default document is set as Home.aspx
<defaultDocument>
<files>
<add value="Home.aspx" />
</files>
</defaultDocument>
I have not removed any of the iis7 default documents. However, Home.aspx is first in the priority.
I want to create a CCLayer with an animated tiled background from a larger texture atlas with Cocos2d.
I know how to drop a background in a CCLayer. I know how to create an animated CCSprite. I even know how to handle tiled world maps. But I can't find a proper way to combine all these elements in the desired form.
How would I do this?
Hi Guys,
after playing around this morning, i've found that there's this default chunk of html code in the amazon webstore which will add a toolbar on top of the page. the html looks like below:
<td id="wba_logo_bg">
<table class="logo" border="0" cellpadding="0" cellspacing="0" width="100%">
<tbody><tr><td align="left"></td>
<td class="wba_account" style="padding: 5px;" align="right" valign="top">
<table border="0" cellpadding="0" cellspacing="0">
<form action="#" id="searchForm" method="get" name="searchForm"></form>
<tbody><tr><td class="wba_account_link">
<a xmlns:xhtml="http://www.w3.org/1999/xhtml" class="myAccountNav" href="#" onclick="return false;">home</a></td>
<td class="myAccountDots"></td>
<td class="wba_account_link"><a class="myAccountNav" href="#" onclick="return false;">view cart</a></td>
<td class="myAccountDots"></td><td class="wba_account_link"><a class="myAccountNav" href="#" onclick="return false;">my account</a></td>
<td class="myAccountDots"></td><td class="wba_account_link"><a class="myAccountNav" href="#" onclick="return false;">order status</a></td>
<td><img src="pageEditor_files/1_pixel.gif" hspace="7"></td>
<td><input name="keyword" tabindex="1" type="text"></td>
<td><img alt="Search" class="wba_search_btn" onclick="return false;" onkeyup="if (13==event.keyCode) searchForm.submit();"
src="pageEditor_files/btn_search.gif" style="cursor: pointer;" tabindex="2" title="Search" hspace="3">
</td></tr></tbody>
</table>
</td></tr></tbody>
</table>
</td>
and thus far i was able to use prototype to find those with the class name of wba_account_link and hide them via the codes below:
function hideAmazonToolbar()
{
$("wba_logo_bg").hide();
}//end function
but what i really want to do is preferably to hide the whole tbody instead, but with my limited prototype skills, i don't really know how to do this. can anybody point me to the right resources on how to get this done?
thanks!
EDIT
Went higher up and apparently there's a td with an id, and solve it using prototype hide function! man, i love javascript framework :)
thanks :)
i have the following code
Private Sub select_color_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles select_color.Click
Dim ocolor As New ColorDialog
ocolor.ShowDialog()
Me.BackColor = ocolor.Color
End Sub
and it changes the background color of form to the color i select in colordialogue...
now i want to change the BGColor of shockwaveobject in this way...however i can change the BGColor of shockwave object manually in toolbox but i want to change it by color dialogue how can i do that...
Hi all,
My prob in brief:
I am validating a registration form with server side using php and its working fine.
Now my prob is i need to show the error message using thickbox like popup.
Is that possible. If yes please explain how?
thanks in advance
I'm in need of help... this is my first time asking a question in SO, so please be kind :)
I'm trying to force-download a file from php, so when the user hits a certain button, he gets a file download. The file is a csv (email, username) of all registered users.
I decided to add this button to the admin users screen, as you can see in this screenshot.
So I added the following code to the addToolbar function in administrator/components/com_users/views/users/view.html.php:
JToolBarHelper::custom('users.export', 'export.png', 'export_f2.png', 'Exportar', false);
This button is mapped to the following function in the com_users\controller\users.php controller:
public function exportAllUsers() {
ob_end_clean();
$app = JFactory::getApplication();
header("Content-type: text/csv");
header("Content-Disposition: attachment; filename=ideary_users.csv");
header("Pragma: no-cache");
header("Expires: 0");
echo "email,name\n";
$model = $this->getModel("Users");
$users = $model->getAllUsers();
foreach ($users as $user) {
echo $user->email . ", " . ucwords(trim($user->name)) . "\r\n";
}
$app->close();
}
Now, this is actually working perfectly fine.
The issue here is that after I download a file, if I hit any button in the admin that causes a POST, instead of it performing the action it should, it just downloads the file over again!
For example:
I hit the "Export" button
"users.csv" downloads
Then, I hit the "search" button
"users.csv" downloads... what the hell?
I'm guessing that when I hit the export button, a JS gets called and sets a form's action attribute to an URL... and expects a response or something, and then other button's are prevented from re-setting the form's action attribute. I can't think of any real solution for this, but I'd rather avoid hacks if possible.
So, what would be the standard, elegant solution that joomla offers in this case?
I am looking for a simple computer algebra system (cas) for JavaScript but I can't find anything with google. I only need basic functionality:
simplify expressions to some canonic form. Ability to check if two expressions are the same, i.e., a(x+y) == ax+ay
parse mathematical formulas. I want it to be able to read expressions like ax²+4x.
solve simple equations etc.
Do you know of such a library?
It's not a practically important issue, but could you please provide me with an example of tacit programming in F# where my `pointless' functions can have multiple arguments (not in form of list or tuple);
And secondly, where those functions can manipulate a complex data structure. I'm trying to manage it in FSharp interactive, but have no success yet.
Huh.. I've managed to construct something:
(fun _ - (fun _ - (+))) 333 222 111 555
Is that right way?
I have a Django site in which the site admin inputs their Twitter Username/Password in order to use the Twitter API. The Model is set up like this:
class TwitterUser(models.Model):
screen_name = models.CharField(max_length=100)
password = models.CharField(max_length=255)
def __unicode__(self):
return self.screen_name
I need the Admin site to display the password field as a password input, but can't seem to figure out how to do it. I have tried using a ModelAdmin class, a ModelAdmin with a ModelForm, but can't seem to figure out how to make django display that form as a password input...
Basically what I want to do is display an email using javascript to bring the parts together and form a complete email address that cannot be visible by email harvesters.
I would like to take an email address eg [email protected] and break it to:
$variable1 = "info";
$variable2 = "thiscompany.com";
All this done in PHP.
Regards,
JB
I am working on a form with the possiblity for the user to use illegal/special characters in the string that is to be submitted to the database. I want to escape/negate these characters in the string and have been using htmlspecialchars(). However, I would like to know if there is a better/faster method.
I am trying to echo the action for my form if a post equals 'paypal'
This is what I have:
<?php if $_POST['method'] == 'paypal' echo 'action="paypal/process.php"' else echo 'action="moneybookers/process.php" '?>
Do i need to print the variable before I do this? what am I doing wrong?
I get this error:
Parse error: syntax error, unexpected T_VARIABLE, expecting '(' in /var/www/account/credits/credit_amount.php on line 27
How do I go about sending a Windows Message to a form in my application that is not the MainForm? Using the code below gives me an Access Violation.
procedure TMainForm.SendMessageToAnotherForm;
begin
SendMessage(MyForm.Handle,WM_MY_MESSAGE,0,0);
end;
MyForm has already been created and is the top most window.
Hi,
My tables are named in a plural form - Models / Entities, is there a way to make the generated classes named Model / Entity?
(Don't know if this is relevant, but I'm using Propel as the ORM)
Thanks.
Hello , how do I disable browsing to a http link from a Html editor. I have a vb.net web form with a html editor, when I add a hyperlink to the html editor, for example my application website for instance
http://myapplication/myloginpage.aspx
When I run and click the link I can browse my application from inside the Html Editor, which is so weird. How do I stop this from happening.
This is an Intranet application. And the component for Html Editor is of TMS.
Hello everyone! I have to write a method on C# that associates a certain key ( from the keyboard) to a specific button.For example.... if I press "a"....... the button that I created on a form application should appear like if it is being pressed. I dont really know how to do that and I would appreciate your help! :)
Hello all,
i need to integrate modules that are developed in separate win form application.Application can run and test individual and in the integrated.i required to create a set up and deploy at client site.My two biggest challenges are keep assemblies in one place and reference them in application.
I am working on an MVC site using NHaml for the view engine.
I have a page that needs to submit HTML code as a form value and am getting the System.Web.HttpRequestValidationException thrown at me.
I want to specify the <%@ Page validateRequest="false" % so that this page will allow this data to be submitted but am unsure on how to do this with NHaml generating the pages.
I have a very simple AJAX example that doesn't work.
It is from the Microsoft tutorials on AJAX.
When I click on button "Button1" AJAX should execute but the whole page submits.
Here is the code:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="1111.aspx.cs" Inherits="_1111" %>
<%@ Register Assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
Namespace="System.Web.UI" TagPrefix="asp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<p>
DropDownList AutoPostBack SelectedIndexChanged EventArgs Sort ... Since you will
be using AJAX to process your SelectedIndexChanged event, set the AutoPostBack property
of the DropDownList to false. ...</p>
<div>
<asp:ScriptManager ID="ScriptManager1" runat="server" EnablePartialRendering="true">
</asp:ScriptManager>
<asp:Label ID="label2" runat="server"></asp:Label><br />
<asp:Label ID="label3" runat="server"></asp:Label><br />
<center>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:Label ID="label1" runat="server"></asp:Label>
<asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="Button 1" />
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="Button1" EventName="Click" />
</Triggers>
</asp:UpdatePanel></center>
</div>
</form>
</body>
</html>
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
public partial class _1111 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
label1.Text = System.DateTime.Now.ToString();
label2.Text = System.DateTime.Now.ToString();
label3.Text = System.DateTime.Now.ToString();
}
protected void Button1_Click(object sender, EventArgs e)
{
label1.Text = System.DateTime.Now.ToString();
}
}
In an auto-generated chart based on a query (I dragged the chart object onto a blank form to start it), the chart itself is displaying and updating properly, datawise, but I want to change the Legend from reading "SumOfAvgOfield1" and "SumOfAvgOfield2" to regular words suitable for final presentations. But I can't find a way to change it!
I am using asp.net webforms... I have a user registration form where the user uploads his resume.... I use a file upload control and when the user submits it i trigger mail to few mailIds... Now my problem can i attach the file which was uploaded by the user as attachment to the mailids... Is it possible in asp.net... Any suggestion....
With ASP.NET Webforms, I could drag and drop a control on a form and be able to access its properties:
if (number == 0)
AddButton.Enabled = false;
Although I cannot drag and drop a control on a ASP.NET MVC View template, can I change its attributes?
For instance:
disable a button in some conditions and be able to enable it if conditions change.
Be able to change the text of a button from "Next-" to "Finish"
etc.
Hi all i am new to black berry.I have Experience on Android .Now i want to learn Black berry .In android an application contain res folder in that we add the lay out in xml form and we can create the forms easily using views and lay outs.
In the same way is there any facility in black berry?please give me some suggestions to prepare forms in black berry .