|
When I request a .aspx page that is not on our site, I get redirected to a custom error page which is the designed behavior. When I request a pdf that is not on our site, however, I get a generic 404 error. My web.config has the following:
<customErrors mode="RemoteOnly" defaultRedirect="default.aspx">
<error statusCode="403" redirect="dcg/PageNotFound.aspx" />
<error statusCode="404" redirect="dcg/PageNotFound.aspx" />
</customErrors>
On top of this, when I do get redirected to "dcg/PageNotFound.aspx" page, the browser is appending the page to itself over and over like it's in a continual error loop. I don't understand why this is happening. Any help would be appreciated.
|
|
|
|
|
I found the continual loop problem. It was an Ajax call. I still do not know why I get the generic 404 when a pdf is requested.
|
|
|
|
|
Problem solved. After reading a number of articles, I saw mention of how a global.asax page can be used to handle errors. Now, when a pdf is requested and it's not on our site, the 404 is handled correctly.
|
|
|
|
|
Sorry experts if this is cheap question.
I have been struggling to get a handle on responsive web design and have been scouring the web for useful information.
Even though there is a lot of stuff out there, I keep running into the following:
<link rel="stylesheet" type="text/css" media="screen and (max-device-width: 320px)" href="style320.css" />
<link rel="stylesheet" type="text/css" media="screen and (max-device-width: 544px)" href="style544.css" />
<link rel="stylesheet" type="text/css" media="screen and (max-device-width: 768px)" href="style768.css" />
<link rel="stylesheet" type="text/css" media="screen and (max-device-width: 992px)" href="style992.css" />
<link rel="stylesheet" type="text/css" media="screen and (max-device-width: 1200px)" href="style1200.css" />
My question is, where do I find the css files for instance style320.css, style544.css, etc?
I am essentially trying to convert the following html into responsive login page but nothing I have tried so far seems to be worked when I view the page on iphone.
<form id="FormToValidate" method="POST" action="verify_login.php">
<table width="560px" align="center">
<tr>
<td width="100%"><img id="Img2" src="images/welcome.gif" alt="" runat="server" /></td>
</tr>
<tr>
<td>
<span style="color:red;font-weight:bold;">INSTRUCTIONS:</span> To log into the screen, you will need to sign in with your .....</span>.
</td></tr><tr><td> </td></tr>
<td>
<span style="background-color:Yellow;"> eg: *****</span>
</td>
</tr>
<tr>
<td width="100%"><img id="Img1" src="images/line.gif" alt="" runat="server" /></td>
</tr>
</table>
<table>
<tr>
<td nowrap>
<div class="input text">
<label>User Name:</label>
<input maxlength="40" class="required" name="user" id="user" size="20" placeholder="Enter username!" type="text" title="Please enter a username." tabindex="2" value="" style="width:400px;color:#000;font-size:10pt;height:20px;" />
</div>
</td>
</tr>
<tr>
<td nowrap>
<div class="input text">
<label>Password:</label>
<input maxlength="40" class="required" name="pass" id="pass" size="20" placeholder="Enter password!" type="password" tabindex="3" title="Please enter a password." value="" style="width:400px;color:#000;font-size:10pt;height:20px;" />
</div>
</td>
</tr>
<tr>
<td></td>
<td>
<div class="buttonSubmit">
<input type="submit" id="btnValidate" style="width:80px; margin-left:-152px;" value="Log in >>" />
</div><br clear="all"/>
</td>
</tr>
</table>
</form>
Thanks a lot in advance
|
|
|
|
|
Since there's no path specified in the href attribute, you find them in the same folder as your HTML / PHP file. If they don't exist, then you need to create them.
This example appears to be using a desktop-first approach, meaning that the styles in styleX.css only apply to screens up to Xpx wide. You would also need to have a base stylesheet with no media query, which would provide the base styles, and the styling for screens larger than your maximum breakpoint (1200px ).
The alternative is to use a mobile-first approach; your base styles provide the styling for mobile devices, and you then use media queries with min-width / min-device-width to override the styling for larger screens.
You don't have to use separate stylesheet files; you can do it all in one:
@media screen and (max-device-width: 320px) {
}
@media screen and (max-device-width: 544px) {
}
...
NB: You'll struggle to make that form responsive as-is. You've used <table> s for layout, and you have fixed widths in inline styles. You've also used a negative margin to shift the button. You'll need to change the markup before you start trying to apply a responsive design to it.
Google has plenty of examples of creating a responsive login form, which would probably be a better place to start.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Awesome!
As always, thank you very much Richard.
|
|
|
|
|
Hello,
i run a website with tables of diffrent contact numbers in the UK.Its a free project im working on. I have some issue with this table that wont go to the main DB and i cant find a way to control it...
I think the best way is just working with some tables plugin for WP?
Thank you
|
|
|
|
|
Member 12768096 wrote: I think the best way is just working with some tables plugin for WP?
So...is this a statement or a question?
Is WP short for WordPress, or some other acronym, or did you forget an F, or...?
We need information to give you any help.
"There are three kinds of lies: lies, damned lies and statistics."
- Benjamin Disraeli
|
|
|
|
|
I have a page called MainPage which has a draggable object and an iframe. When the iframe loads it opens a page called TestPage which is in the same domain as MainPage.
The droppable area is in TestPage and when I drop an object into the iframe on MainPage I would like the object to appear on TestPage at the exact location it was dropped. Currently I am able to drag but not drop the object in the drop area.
Please see my markup and script here.
modified 28-Sep-16 19:42pm.
|
|
|
|
|
I have the following code:
$('#GetEmployee').click(function () {
var id = $('#employeeidget').val();
$.ajax({
url: 'http://localhost:56811/api/Values/Get?id=' + id,
type: 'GET',
dataType: 'jsonp',
success: function (data) {
var items = '';
$.each(data, function (i, item) {
var rows = "<tr>"
+ "<td>" + data.EmployeeID + "</td>"
+ "<td>" + data.Name + "</td>"
+ "<td>" + data.ManagerID + "</td>"
+ "</tr>";
$('#tblEmployee tbody').append(rows);
});
},
error: function (jqXHR, exception) {
if (jqXHR.status == 404) {
alert('Requested page not found. [404]');
} else if (jqXHR.status === 0) {
alert('Not connect.\n Verify Network.');
} else if (jqXHR.status == 500) {
alert('Internal Server Error [500].');
} else if (exception === 'parsererror') {
alert('Requested JSON parse failed.');
} else if (exception === 'timeout') {
alert('Time out error.');
} else if (exception === 'abort') {
alert('Ajax request aborted.');
} else {
alert('Uncaught Error.\n' + jqXHR.responseText);
}
}
});
I don't know what I am doing wrong but every time the ajax call is done it goes to error function
The error I am getting is jqXHR.status === 0 connect verify network. CORS is enabled in web.config file
modified 16-Sep-16 8:44am.
|
|
|
|
|
Member 8154845 wrote: CORS is enabled in web.config file
In which site? The one that's hosting your API, or the one where your code is running?
Member 8154845 wrote: dataType: 'jsonp',
Have you configured the JsonpMediaTypeFormatter , as described in this StackOverflow thread[^] and this tip[^]?
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
@Richardd Deeming
Thank you for the response. I have CORS enabled in API.
No, I did not have JsonpMediaTypeFormatter configured. Let me try configuring it.
|
|
|
|
|
What is jqXHR.responseText when the error occurs?
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
>Hi,
I have a Oracle DB in which all the information is stored and this information is been consumed by different teams and below is the two options i have to decide on :
1. Write a Stored procedure and give the stored procedure to the respective teams and they can call the stored procedure.
2. Write a stored procedure wrap it as an API and expose the API, different team will call the API exposed and API will in turn hit the SP and return the response to the team.
Like to know what is the PRON and CRONS with these options and what is the best possible solution to go with.
Thanks
|
|
|
|
|
|
Java Lead wrote: 1. Write a Stored procedure and give the stored procedure to the respective teams and they can call the stored procedure. Callers of the Stored Procedure will need direct access to the Oracle DB.
Java Lead wrote: 2. Write a stored procedure wrap it as an API and expose the API, different team will call the API exposed and API will in turn hit the SP and return the response to the team. This gives you the most control over the situation and is likely to be the most secure.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
The second option is better than the first one if different teams are working.
|
|
|
|
|
I want to know what are the most sought after technologies for becoming a Full Stack Developer.
I am asking with respect to both, Open Source and Microsoft Stack.
|
|
|
|
|
FORTRAN with a dumb terminal front end.
But seriously, all you're going to get here is opinions. Why not go look up some statistics from survey firms, like Gartner?
"There are three kinds of lies: lies, damned lies and statistics."
- Benjamin Disraeli
|
|
|
|
|
Hi All,
I saw many posted and infact I worked on JSON based asp.net app which use to JSONSeralizecontents and then pass that data to WEB Services on same machine and then webervice creates objects of it and call an SP with parameters on SQL and the response back to UI. now that was fine until i was on intranet where the app was open with basic username and passowrd however
now I am looking for hosting this app on Internet / Cloud Machine on Amazon so my doubt is that is same Infrastructure still good since
1. I may be looking to get away with the webservice parts which reads json to create object and then use it to create SQL Command with parameters. I wish to get rid of this layer so that I can pass JSON to SQL and perform operation there itself.. or have a very light wrapper for this on web service so need suggestions on it
2. I may also be looking to secure the data which is over the internet. The app will be mainly used on PDA and Laptops Browsers so what is the best way to secure it (https, JWT or some other light weight mechanism).
Also I wish to have SSO enabled for my apps.
Kindly suggest.
cheers
varun sharma
|
|
|
|
|
So, your current application base uses username/password on an intranet, but is it leveraging Basic or Windows authentication? If you're on Windows then you're in luck, that same mechanism can work for an internet site and provide the SSO support that you're looking for.
"There are three kinds of lies: lies, damned lies and statistics."
- Benjamin Disraeli
|
|
|
|
|
Thanks for your kind reply Nathan. I am yet to start development so I shared what I knew before hand with Asp.net + JSON and sql. Finally I am looking to deploy my app on Cloud (AWS or Azure or some other basic cloud so that my customers can use it from anywhere around the world with same performance and speed over the internet). I was initially looking at AJAX + JSON with ASP.NET on front end and oracle at bank end but now i have a SQL guy who can do it better.
I could either do JSON front end (with Ajax call with JSON data) -- webservice (convert JSON in .NET Object or Object) and call -- SQL Stored Proc with SQLCommend and Parameters
I am looking for a better way to do it since this design is almost 8 years old, toady we have latest and better techs which I may not be well aware of son kindly suggest.
cheers
varun sharma
|
|
|
|
|
COULD ANYBODY HELP IN MAKING A WEBSITE TO SELL CARS? I NEED A WEBSITE THAT CAN SEARCH AND LIST OUT DIFFERENT CARS WHICH THE USER WANTS AND DISPLAY IT?? REALLY URGENT.. COULD ANYBODY GIVE AN IDEA HOW TO DO IT OR GIVE ME THE FINAL RESULT SOMEHOW?? THANKS U
|
|
|
|
|
Hmmm.. do you really need to type with "all CAPS"? Adding the word "urgent" does not add value to your post, sometimes it's considered rude and nobody is interested in that. 
|
|
|
|
|
This site does not provide code to order. Nobody here is going to do your work for you, no matter how "urgent" you tell us it is, or how much you shout at us.
If you've taken on a project, but don't know where to start - ie: you've lied to your client - then you'll need to go to a site like freelancer.com and pay someone to do the job for you.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|