N2CMS virtual path provider fails on web server - n2cms

I'm building a web site with N2 using the NuGet packages (which I'm compiling myself straight from GitHub). The files that make up the management interface in the /N2 folder are all compiled into N2.zip, and there's a virtual path provider configured to serve anything in the /N2 folder from the zip file.
On my development machine, it works perfectly. When I deploy it to the web server (running IIS 6 or IIS 7.5), requests for files in the /N2 folder return with a 404. There is a curious exception: requests with querystring values are served up. For example, /N2/Login.aspx?ReturnUrl=%2fn2 works, but /N2/Resources/Css/All.css does not. (I'm using Fiddler 2 to monitor the requests.)
This is an MVC site, running under .Net 4.0, and not precompiled.
I turned on ASP.Net tracing in web.config, and from that I can see that the VPP is executing, because it writes trace lines starting with ZipVPP:
ZipVPP: False ~/default.cshtml
ZipVPP: False ~/default.vbhtml 4.79004203405183E-05 0.000048
ZipVPP: False ~/index.cshtml 9.07992130999052E-05 0.000043
ZipVPP: False ~/index.vbhtml 0.000125475536747951 0.000035
ZipVPP: False /Views/Home/Index.aspx 0.000476485344693378 0.000351
ZipVPP: False /Views/Home/Index.ascx 0.000554325119945653 0.000078
ZipVPP: False /Views/Shared/Index.aspx 0.000631632393110378 0.000077
ZipVPP: False /Views/Shared/Index.ascx 0.000704500969472239 0.000073
ZipVPP: False ~/Views/Home/_ViewStart.cshtml 0.000794229163423298 0.000090
ZipVPP: False ~/Views/Home/_ViewStart.vbhtml 0.000833389826910285 0.000039
ZipVPP: True ~/Views/_ViewStart.cshtml 0.000872745800133037 0.000039
ZipVPP: False ~/_ViewStart.cshtml 0.000935947959862434 0.000063
ZipVPP: False ~/_ViewStart.vbhtml 0.000972131211344948 0.000036
ZipVPP: True ~/Views/Shared/_Layout.cshtml 0.00102791407786914 0.000056
ZipVPP: False /Views/Home/LayoutPartials/Rotator.aspx 0.00113080303437734 0.000103
This suggests it might be a bug in the VPP, but I'm not sure.

The fix was to configure IIS 6 for wildcard routing, so that all requests, including images, css, script, etc. go through ASP.Net. That give the virtual path provider a chance. Without wildcard routing, IIS will look at the file extension, and for a typically static file type like .jpg or .css, just look for the file in the file system. Since the files aren't there, it returns a 404.
To configure this, see N2CMS virtual path provider fails on web server. Adjust the path to aspnet_isapi.dll to correspond to the .Net version you need, and un-check "check that file exists."

Related

How Can I set statistics-Enabled to True for EJB and undertow In JBOSS EAP 7.1?

How can I set Statistics-Enabled=True for /subsystem=undertow/servlet-container= default/server=default-server/http-listener=default ?
Apparently, there is no function to enable statistics for a particular listener. But you can enable statistics for subsystem undertow.
To read attribute :
/subsystem=undertow:read-attribute(name=statistics-enabled)
To change the attribute :
/subsystem=undertow:write-attribute(name=statistics-enabled,value=true)
You may need to prefix the command with particular profile.
Reference for other commands to enable statistics : https://www.ibm.com/support/knowledgecenter/en/SSMKFH/com.ibm.apmaas.doc/install/jboss_config_agent_prereq_enable_web_statistics_collection.htm

How to configure open-fire server with HttpUploadComponent for offline file transferring?

I use Openfire with Conversations and would like to implement offline file transferring with HttpUploadComponent, I have copied httpupload folder inside openfire folder as below screenshot:
Then I did below configurations in openfire:
I also installed Python and configured config.yml file in httpupload folder like below:
component_jid: upload.192.168.105.164
component_secret: 1234
component_port: 5275
storage_path : ./var/lib/httpupload/
max_file_size: 20971520 #20MiB
http_address: 0.0.0.0 #use 0.0.0.0 if you don't want to use a proxy
http_port: 8080
get_url : http://192.168.105.164:8080/
put_url : http://192.168.105.164:8080/
expire_interval: 82800 #time in secs between expiry runs (82800 secs = 23 hours). set to '0' to disable
expire_maxage: 2592000 #files older than this (in secs) get deleted by expiry runs (2592000 = 30 days)
user_quota_hard: 104857600 #100MiB. set to '0' to disable rejection on uploads over hard quota
user_quota_soft: 78643200 #75MiB. set to '0' to disable deletion of old uploads over soft quota an expiry runs
allow_web_clients: true #answer OPTIONS requests to allow web clients to upload files
I did run Httpupload server as well :
After starting python server, if you go openfire\serversetting\external components*view the external components* [in the first line], you'll see whether session is created or not:
After all of this, when I want to send a file from android client its failling and It gives me this error:
Where is my problem? Thanks.
In attached error screenshot, the last word is 403, which is indicating that it's related to authorization on HttpUploadComponent end.
Now I started to check the code of this component and on line 83 of https://github.com/siacs/HttpUploadComponent/blob/master/httpupload/server.py it is picking the variable "storage_path" from configuration to place the file in that directory.
Now as mentioned in your question, you have set storage_path : ./var/lib/httpupload/
But you are on a windows machine and this path is invalid.
Try giving a valid windows os path.

boot-refresh inside cider-connect

After following the suggested steps at
https://github.com/samestep/boot-refresh
the intended hot-reloading behavior works when using cider-jack-in from inside a boot project.
However, in the following scenario it does not work. consider this boot task:
(deftask dev2 []
(comp
(serve
:handler 'app.core/handler
:reload true
:port 3000
:httpkit true
:nrepl {:port 4000})
(watch) (refresh) ;; doesn't work with or without this line
))
The relevant part is the :nrepl keyword.
After this task is fired, one can connect to a nrepl server at port 4000, which has the advantage of accessing the actual state of the application during development. (see this post for more details)
This can be done via cider-connect. However, in there the hot-reloading is gone. The :reload true option might confuse here, this only triggers a source reload when a http request is done. But I'm looking for the more general approach of boot-refresh.
note: The intention here is to have a live-reloading behavior on the server side, which is similar to concepts known on the client side (figwheel or boot-reload).

ATG Commerce v11 CRS install Error:

I have installed Oracle ATG v11 with the commerce reference store, when I startup the production server and go to the url domain/crs/storeus I see the blank white page, and have the following error in the console:
Oct 13, 2014 1:56:37 PM com.endeca.infront.site.SiteManager getSite
SEVERE: Unable to retrieve site definition for site id: /storeSiteUS
com.endeca.store.exceptions.PathNotFoundException: No node found at
path: [pages].
at com.endeca.store.configuration.InternalNode.getNode(InternalNode.java:153)
at com.endeca.store.configuration.InternalNode.getNodeInfo(InternalNode.java:221)
at com.endeca.store.configuration.InternalNode.getNode(InternalNode.java:150)
at com.endeca.store.configuration.InternalNode.getNode(InternalNode.java:61)
........................................
**** Error Mon Oct 13 13:00:47 +00:00 2014 1413205247448 /atg/endeca/assembler/droplet/InvokeAssembler A problem occurred
assembling the content for content item /content/Web/Home Pages. The
response received was {#type=ContentSlot,
atg:currentSiteProductionURL=/crs/storeus,
canonicalLink=com.endeca.infront.cartridge.model.NavigationAction#2b35e9c6,
ruleLimit=1, #error=com.endeca.infront.content.ContentException:
com.endeca.navigation.ENEConnectionException: Error establishing
connection to retrieve Navigation Engine request
http://localhost:15000/graph?node=0&profiles=sitegroup.siteGroupUS|NoPriceRange|site.storeSiteUS&offset=0&nbins=0&irversion=640'.
Tried all: '2' addresses, but could not connect over HTTP to server:
'localhost', port: '15000' Check MDEX Logs and specified query
parameters. , contentCollection=/content/Web/Home Pages}. Servicing
the error open parameter.
I am assuming this error is related to endeca? I have downloaded CAS, Tools And Frameworks with experience manager and MDX, and Platform Services. Do I need to start these or have I missed a part of the endeca install?
The value of the configurationPath attribute in the DefaultFileStoreFactory.properties located at \localconfig\atg\endeca\assembler\cartridge\manager may be incorrect.
In OOTB CRS, we normally provide the following value for configurationPath attribute :
/ToolsAndFrameworks/11.1.0/server/workspace/state/repository/CRS
Could you please verify the .zip is present at path provided in DefaultFileStoreFactory.properties.
Just check if you are able to connect the below url:
host:15000/admin?op=stats
If you are able to connect this URL, then MDEX is running. Also, you can login to the experience manager and check if the dgraphs and dgidx are running.
If you are not able to connect then check all the services are(tools and http) running and accessible. You can check the endeca logs to debug further.
Your DGraph is not (yet) started.
(Hit this URL in your browser and verify: http://localhost:15000/graph?node=0&profiles=sitegroup.siteGroupUS|NoPriceRange|site.storeSiteUS&offset=0&nbins=0&irversion=640&format=xml)
Possible reasons are:
You did not run baseline update from ATG (from
ProductCatalogSimpleIndexingAdmin dyn/admin component).
You did not run promote content (from your Endeca App's control folder).
Your Services are not working properly (or not started at all). Check that Platform Services and Tools And Frameworks are started.
The solution is to properly define the value for the property configurationPath=E:/Endeca/Apps/CRS/data/workbench/application_export_archive/CRS in "DefaultFileStoreFactory.properties"
If you are using the OS as Windows then define this path as Unix style as shown above.

Error with "Get Started" on Oracle Express 11g

this is my first post so I will try to be as descriptive as possible. Please let me know if there is anything missing:
So I am trying to install Oracle Express 11g, after I download the zip file "OracleXE112_Win32" - I unzip it, and open Disk 1 then setup. I go through the entire installation process without any problems. However when I go to open "Get Started" I come across the following error:
"Windows cannot find 'http:/.127.0.0.1:%HTTPPORT%/apex/f?p=4950'. Make sure you typed the name correctly, and then try again. -- After googling this, I was told to change %HTTPPORT% to 8080.
If I do this when I click on "Get Started" the following error shows up:
"Firefox can' establish a connection to the server at 127.0.0.1:8080."
I need this to work, so that I can sooner or later connect this to my eclipse, so that I can start doing my homework for my Java Programming class. Any help is greatly appreciated, thank you so much!
I have found one solution for this problem. In order to explain my solution, I have used some aliases referring to my real parameters. These are:
[ME] = my user name
[MYHOST] = my current workstation hostname (netbios name as well)
[MYHOST.mycompany.com] = my worksation's fully qualified domain name
At the beginning I had the same situation as mentioned above: I was unable to connect to the apex service even after successful installation.
First I have used the tnsping oracle utility:
C:\Users\ME>tnsping MYHOST
This was the answer:
TNS Ping Utility for 32-bit Windows: Version 11.2.0.2.0 - Production
Copyright (c) 1997, 2010, Oracle. All rights reserved.
Used parameter files:
C:\oraclexe\app\oracle\product\11.2.0\server\network\admin\sqlnet.ora
Used HOSTNAME adapter to resolve the alias
Attempting to contact (DESCRIPTION=(CONNECT_DATA=(SERVICE_NAME=))(ADDRESS=
(PROTOCOL=TCP)(HOST=fe80::5d34:78a:5862:64%20)(PORT=1521))
(ADDRESS=(PROTOCOL=TCP)(HOST=fe80::c27:54a4:1600:86a4%26)(PORT=1521))(ADDRESS=
(PROTOCOL=TCP)(HOST=fe80::38ab:cdb4:dd77:7ed9%12)(PORT=1521))(ADDRESS=(PROTOCOL=TCP)
(HOST=10.9.32.208)(PORT=1521))(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.56.1)(PORT=1521))
(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.1.106)(PORT=1521)))
TNS-12541: TNS:no listener
You see above a lot of currently active different IP addresses. Only the most important 127.0.0.1 is missing. I work on notebook so the network is "almost always" changing (WLAN, 3G, HSDPA, Ethernet etc.) only the localhost is fixed. And that was the real case of the trouble. (When I was working at the office environment connected to the office network it was also working.)
When I was in this situation I also started to use the lsnrctl oracle utility.
I have seen the following:
LSNRCTL> status
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for 32-bit Windows: Version 11.2.0.2.0 - Production
Default Service XE
Listener Parameter File /oraclexe/app/oracle/product/11.2.0/server\network\admin\listener.ora
Listener Log File C:\oraclexe\app\oracle\diag\tnslsnr\MYHOST\listener\alert\log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC1ipc)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=MYHOST.mycompany.com)(PORT=1521)))
Services Summary...
Service "CLRExtProc" has 1 instance(s).
Instance "CLRExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "PLSExtProc" has 1 instance(s).
Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
You can see that the service for the apex at 8080 port is missing !!!
I have tried also the normal ping which worked perfectly:
C:\Users\ME>ping MYHOST.mycompany.com
The result was:
MYHOST.mycompany.com [fe80::c27:54a4:1600:86a4%26] ping
response fe80::c27:54a4:1600:86a4%26: time<10 ms
...
You can realize the IPv6 address also exists in my tnsping trial as well.
So I have decided to define MYHOST in my local hosts file directly:
127.0.0.1 localhost MYHOST MYHOST.mycompany.com
Testing now with ping:
C:\Users\ME>ping MYHOST
And the answer:
MYHOST.mycompany.com [127.0.0.1] ping:
response 127.0.0.1: byte=32 time<10 ms. TTL=128
...
At this point I have restarted (stopped and started again) the both running Oracle services (just for sure):
OracleServiceXE
OracleXETNSListener
And look the miracle:
C:\Users\ME>lsnrctl
LSNRCTL for 32-bit Windows: Version 11.2.0.2.0 - Production
LSNRCTL> status
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for 32-bit Windows: Version 11.2.0.2.0 - Production
Default Service XE
Listener Parameter File /oraclexe/app/oracle/product/11.2.0/server\network\admin\listener.ora
Listener Log File C:\oraclexe\app\oracle\diag\tnslsnr\MYHOST\listener\alert\log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC1ipc)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=MYHOST.mycompany.com)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=MYHOST.mycompany.com)(PORT=8080))(Presentation=HTTP)(Session=RAW))
Services Summary...
Service "CLRExtProc" has 1 instance(s).
Instance "CLRExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "PLSExtProc" has 1 instance(s).
Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "XEXDB" has 1 instance(s).
Instance "xe", status READY, has 1 handler(s) for this service...
Service "xe" has 1 instance(s).
Instance "xe", status READY, has 1 handler(s) for this service...
The command completed successfully
LSNRCTL>
You can see the important line with PORT=8080 and service XE instance.
So I am happy the getting started URL is working again.
What browser are you using? I experienced the same issue with Chrome. Download firefox, Right click the "Get Started With Oracle Database 11g Express Edition" icon and change the "opens with" option to firefox.
Simple solution:
You need to directly tell where your http port is. To do so; open up the folder where your Oracle is stored and navigate to server folder( in my case C:\Oracle\oraclexe\app\oracle\product\11.2.0\server) in that folder right click to Get_Started file and choose properties. There you can hand type your http port which is usually 8080 in my case: ....127.0.0.1:8080/apex/f?p=4950
The problem should be solved.
Hope this helps you get through it..
Pinar U.S.
Right Click on the "Get Started" icon and click on the properties and select General tab. Click on change button and select other browser installed in your system other than the current one . after setting this up, you'll be able to open the panel.
I also experienced the same problem for this go to start-> all programs -> Oracle Database 11g Express Edition and right click on get started and click open file location and drag and drop the "Get_Started" to your browser
Ok, I found the solution. Right click on icon of "Get Started With Oracle Database 11g Express Edition", then "properties". Then click "General tab" and then you will see option "change", click on that and then select your browser, click "apply" and "ok". And then start the Database again.
Drag and drop get started link into browser address bar worked great for me, I tried EVERYTHING else, adding port to hosts, changing port in properties etc. nothing worked, until I dragged and dropped... So damn simple, wish I did that hours ago
Your solution is partially correct buddy. You need to match the entries in the file:
C:\oraclexe\app\oracle\product\11.2.0\server\network\ADMIN\listener.ora
(the entries with the --> mark)
:
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
--> (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
--> (ADDRESS = (PROTOCOL = TCP)(HOST = myserver.company.com)(PORT = 1521))
)
)
:
With the entries in the file:
C:\Windows\System32\drivers\etc\hosts
(the entries with the --> mark)
:
--> 127.0.0.1 localhost
--> 1.2.3.4 myserver myserver.company.com
:
Finally, under Administrator account do:
C:> lsnrctl stop
C:> lsnrctl start
Solved. No need for changing name, no drag & drop either.