An URL must stay alive until the end of days

by Necat Bolpaça 9. July 2010 08:20

Simply, i expressed in title, an URL is a resource address to provide some information. Some people very hesitate about them, a site changing its urls not only lose its pagerank and search engine reputation, also loses their bookmarked / shared resources. When other peoples comes you with an old URL for some information needs, a 404 page will appear then these people dissappointed.

Solutions

1. Use a permanent redirect header (301)

A permanent redirect header will redirect a search bot to new resource url. A permanent redirect header also stay alive for bookmarked pages.

2. Use an informational custom 404 page

Some 404 pages doing a search about incoming URL and suggests correct ones. This method may be inappropriate* for some ASP and ASP.NET users, specially using IIS 6 extensionless url on shared hosting possible via a controller 404 page.

If you change this 404 page with your own exclude logic, you can use extensionless urls and url suggest features both.

Tags:

English

string, eval(), aspx markup are all evil. I hate them.

by Necat Bolpaça 19. March 2009 20:17

This bugs driving me insane. If I tracked all code output line by line, and determine which sql query cause a crash, then WHY i am using c# ?

Lets see why c# rocks (from my perspective)

* Its strong typed

 Yes, thats all :)

Uh, there are more reasons:

* When you successfully compile one project (or component) you can trust them a degree. Because everything is a object. You created them, you manipulated them and return values, images etc.

* All things perfectly match with others as good as Legos™

But, when a string comes on, everything must be double-checked. Markup values, some parameters and all sql scripts are string. There is no strong typing and every issue come at runtime.

...

...

(this post like a twitter-like but i dont want write any more about this, at least -for now- thanks.)

Tags:

c# | English

Anthem Library and FCKEditor -- How to update?

by Necat Bolpaça 8. October 2008 20:13

I writing a patch for recently finished admin panel, a product entry form.

I used Anthem in its front face and admin panel for user attraction. But FCKEditor's update status being a problem. I decided using Anthem_PreCallBack and Anthem_PostCallBack events in js so update the textarea (asp:TextBox) value with js do i can use at server-side this value. Sounds good, eh?

First, I use this way:

http://www.fckeditor.net/forums/viewtopic.php?f=6&t=4222

 But Firebug alerts, hmm this way doesnt work, i cannot understand why. How strange. How sad.

Then, I use more standard way: API there:

http://docs.fckeditor.net/FCKeditor_2.x/Developers_Guide/JavaScript_API

Example:

-----------------------------------------------------------------------------

function Anthem_PreCallBack()
{ //document.getElementById('<%=textboxSample.ClientID%>').value = //frames[0].objContent.DOM.body.innerHTML; var oEditor = FCKeditorAPI.GetInstance('<%=textboxSample.ClientID%>'); document.getElementById('<%=textboxSample.ClientID%>').value = oEditor.GetHTML(true); } function Anthem_PostCallBack() { //alert(document.getElementById('<%=textboxSample.ClientID%>').value); //frames[0].objContent.DOM.body.innerHTML = //document.getElementById('<%=textboxSample.ClientID%>').value; var oEditor = FCKeditorAPI.GetInstance('<%=textboxSample.ClientID%>'); if(document.getElementById('<%=textboxSampleIsEditing.ClientID%>').value.length>0) { oEditor.SetHTML(document.getElementById('<%=textboxSample.ClientID%>').value); } else { oEditor.SetHTML(""); } }

-----------------------------------------------------------------------------

 

textboxSample is our primary textbox. Other (textboxSampleIsEditing) is for we are in editing status. For example, if we are editing a row in database we dont want Anthem_PostCallBack reset the fields value. I setting this textboxSampleIsEditing value for different from empty string than js dont reset other textbox, get it? Yes its sucks but i cannot run other ways.

Hope this helps. 

Tags: ,

asp.net | English

Welcome to BlogEngine.NET 1.4

by Necat Bolpaça 29. June 2008 00:00

If you see this post it means that BlogEngine.NET 1.4 is running and the hard part of creating your own blog is done. There is only a few things left to do.

Write Permissions

To be able to log in to the blog and writing posts, you need to enable write permissions on the App_Data folder. If you’re blog is hosted at a hosting provider, you can either log into your account’s admin page or call the support. You need write permissions on the App_Data folder because all posts, comments, and blog attachments are saved as XML files and placed in the App_Data folder. 

If you wish to use a database to to store your blog data, we still encourage you to enable this write access for an images you may wish to store for your blog posts.  If you are interested in using Microsoft SQL Server, MySQL, VistaDB, or other databases, please see the BlogEngine wiki to get started.

Security

When you've got write permissions to the App_Data folder, you need to change the username and password. Find the sign-in link located either at the bottom or top of the page depending on your current theme and click it. Now enter "admin" in both the username and password fields and click the button. You will now see an admin menu appear. It has a link to the "Users" admin page. From there you can change the username and password.  Passwords are hashed by default so if you lose your password, please see the BlogEngine wiki for information on recovery.

Configuration and Profile

Now that you have your blog secured, take a look through the settings and give your new blog a title.  BlogEngine.NET 1.4 is set up to take full advantage of of many semantic formats and technologies such as FOAF, SIOC and APML. It means that the content stored in your BlogEngine.NET installation will be fully portable and auto-discoverable.  Be sure to fill in your author profile to take better advantage of this.

Themes and Widgets

One last thing to consider is customizing the look of your blog.  We have a few themes available right out of the box including two fully setup to use our new widget framework.  The widget framework allows drop and drag placement on your side bar as well as editing and configuration right in the widget while you are logged in.  Be sure to check out our home page for more theme choices and downloadable widgets to add to your blog.

On the web

You can find BlogEngine.NET on the official website. Here you'll find tutorials, documentation, tips and tricks and much more. The ongoing development of BlogEngine.NET can be followed at CodePlex where the daily builds will be published for anyone to download.

Good luck and happy writing.

The BlogEngine.NET team

Tags: ,

BlogEngine.NET | English

Month List

Visitors

Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer's view in  anyway.

--

Bu sitede yazılı olanlar kendi kişisel görüşlerimdir işverenlerimi ve benimle birlikte çalışanları temsil etmemektedir.