|
Thanks Richard!
As I said in my question, I success in redirecting with so many methods and the way you show me was one of my method to redirect the site. The only one thing that makes me in trouble that is after the first times visit, I don't have "301 Moved Permanently" header anymore.
Chinh
|
|
|
|
|
I've tested one of the sites where I've used that rule in the tester site you linked to, and it produces a 301 redirect followed by a 200 status every time.
If you're ending up on the correct URL when you request the wrong URL, then the redirect is working.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
I have made a screenshot video for your easy reference at https://youtu.be/14y3LEL5508[^]. Could you please take a look and point me out how to always have "301 Moved Permanently".
Thanks.
|
|
|
|
|
Looks like Firefox is caching the redirection. If you look at the headers for second request, you'll see that it's requested http://www.ocb.dev/, not http://ocb.dev/, so the 200 response is expected.
There are various suggestions to disable or clear the cached 301 response in this StackOverflow thread[^].
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Hi Richard,
I have finally fixed the issue with help from a network guy in my company. I don't know what he did but I have "301" to be always presented.
Thank you very much for your help!
Chinh
|
|
|
|
|
Hello,
I'am develloping an intranet web site, and i deploy the web site in Server A and i'd like to access to files stored in an other Server B.
My question is how can I access the files (pdf) and view them in the navigator.
Thanks
|
|
|
|
|
Depends on how you want to view them. Since this is an intranet site you could simply hyperlink to them using UNC paths, "\\server1\files\file1.pdf".
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
I have a number of records displayed in a Gridview. Each record contains a blank field called Code.
I want to have a field on my form, field A, which I can add a number to and there will be a button called updateCode. When I click the button updateCode I want the number in field A to be updated to the field called Code in each record displayed in the GridView.
Anyone know if this can be achieved?
|
|
|
|
|
macca24 wrote: Anyone know if this can be achieved? Quite simple really. In your button click code, pass the textbox value to a stored procedure. In that stored procedure, update all the records. Then refresh the grid.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
I have a asp.net web application created in VS 2012 and I want to create reports and letters in it.
Anyone know how to create reports and letters in VS 2012?
|
|
|
|
|
You can use the SSRS Report Viewer control and create SSRS Reports. You can also do Crystal Reports. I believe those are probably the 2 most common report engines used with ASP.Net.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
I have four fields, A, B, C, D
Fields A, B, and C will have numerics added to them. I want that when I have added data to all three fields then field D will automatically be updated with the SUM of the 3 fields A, B and C.
Anyone know how to do this?
|
|
|
|
|
Put an onchange event on each textbox that calls a JS function. In the function, check if all 3 textboxes have numbers in them. If so, add them and put the result into the 4th textbox.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
I have data in a SqlServer table and I want to Select the data into a gridview or something like that and perform a calculation on the data.
I want to have a button that will carry out a calulation on all the records displayed and save the total for each record after the calculation to a field in the DB table containing the records.
Anyone any ideas on best way to do this?
|
|
|
|
|
There is any reason NOT to do the calculations inside SQL? SQL is pretty good with calculations...
Skipper: We'll fix it.
Alex: Fix it? How you gonna fix this?
Skipper: Grit, spit and a whole lotta duct tape.
|
|
|
|
|
|
macca24 wrote: Anyone any ideas on best way to do this? In the button click, call a stored procedure that does the calculation and updates the data and then refresh your grid.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
I have a system which has an asp.net front end and a SQL Server DB.
I get a file in the form of an excel spreadsheet every few weeks that contains a number of fields. I want to load it into the DB and the appropriate fields in the excel spreadsheet would go into the corresponding field in the DB tables.
Anyone know how to do this?
|
|
|
|
|
Try one of the following libraries:
Avoid "office interop" at all costs:
Microsoft does not currently recommend, and does not support, Automation of Microsoft Office applications from any unattended, non-interactive client application or component (including ASP, ASP.NET, DCOM, and NT Services), because Office may exhibit unstable behavior and/or deadlock when Office is run in this environment.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
You could also use SSIS or even create a job to do the work and schedule it in SQL.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
i have requirement of running my application over wan hence i used a fixed ip addres in browser i.e(fixed ipaddress//hostmachineip address//mk(virtual directory)/xyz.aspx(cs file))...and m getting follwing error while accessing my app over wan
Runtime Error
Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.
Details: To enable the details of this specific error message to be viewable on remote machines, please create a <customerrors> tag within a "web.config" configuration file located in the root directory of the current web application. This <customerrors> tag should then have its "mode" attribute set to "Off".
<configuration>
<system.web>
<customerrors mode="Off">
Notes: The current error page you are seeing can be replaced by a custom error page by modifying the "defaultRedirect" attribute of the application's <customerrors> configuration tag to point to a custom error page URL.
<configuration>
<system.web>
<customerrors mode="RemoteOnly" defaultredirect="mycustompage.htm">
i infact googled for this n made changes according to the experties advice but not able to overcome this issue ...what's wrong i am doing here?please anyone suggest me best oible solution to overcome this issue.
Thanks
|
|
|
|
|
Did you convert your site to application in your IIS?
|
|
|
|
|
That message is telling you the real message is being hidden. Do what it says and turn custom messages off to see the real error message.
|
|
|
|
|
yes i did custoerrors mode =Off in web.config file but not result
|
|
|
|
|
Then the web config you think your site is using isn't the one that it *is* using so your site\virtual directory is probably misconfigured.
|
|
|
|